Fun With Cmatrix in Linux
![Fun With Cmatrix in Linux](https://itsfoss.com/content/images/2023/10/install-cmatrix-in-linux.png)
Cmatrix is an entertaining command-line program for Linux and Unix systems. It gives a ‘Matrix’-style display, where a rain of green characters streams down the screen, just like in the iconic Matrix film series.
![Fun With Cmatrix in Linux](https://itsfoss.com/content/images/2023/10/Cmatrix.gif)
But other than this green streams of characters, you can do several other things with this interesting command.
Install Cmatrix in Ubuntu and Other Linux systems
Cmatrix is available in the official repositories of almost all major Linux distributions. In Ubuntu, you can install Cmatrix using the command:
sudo apt install cmatrix
Fedora users should use:
sudo dnf install cmatrix
Arch Linux user can use pacman:
sudo pacman -S cmatrix
Basic cmatrix options
The cmatrix command alone provides several options, to change the appearance of the default output, that is the green character streams.
Bold characters
You can either toggle the bold characters on using -b
option, where you will find occasional bold characters,
cmatrix -b
![Fun With Cmatrix in Linux](https://itsfoss.com/content/images/2023/10/cmatrix-occasional-bold-characters.png)
or, turn all the characters to bold using:
cmatrix -B
![Fun With Cmatrix in Linux](https://itsfoss.com/content/images/2023/10/cmatrix-all-bold-characters.png)
Asynchronous scroll
The usual Cmatrix will create a display, where characters are falling down in a synchronous manner. In this mode, you can see a dynamic and visually engaging display, where the speed of the characters is varied.
To use Cmatrix in asynchronous scroll:
cmatrix -a
Change the speed of characters
Do you want to display the characters falling very fast, or very slow? You can do this in Cmatrix.
To make characters fall down fast, use:
cmatrix -u 2
![Fun With Cmatrix in Linux](https://itsfoss.com/content/images/2023/10/Cmatrix-fast.gif)
Here, the default value of screen update delay is 4 and if you reduce it, the speed will be increased and vice versa. So, to run a slower cmatrix, use:
cmatrix -u 9
![Fun With Cmatrix in Linux](https://itsfoss.com/content/images/2023/10/cmatrix-slow.gif)
Use different Colors
Go green! Or perhaps go purple?
You can run Cmatrix with a different color. For this, you can use the -C
option.
cmatrix -C magenta
![Fun With Cmatrix in Linux](https://itsfoss.com/content/images/2023/10/cmatrix-magenta-color.png)
The supported colors are green, red, blue, white, yellow, cyan, magenta and black.
Other Options
Option | Function |
---|---|
cmatrix -o | Old Style Scrolling |
cmatrix -m | Lambda Mode: Every character becomes a lambda |
cmatrix -s | Screensaver Mode: Exits on first keystroke |
cmatrix -h | Help |
Cmatrix keystrokes during execution
Even if you donโt provide any option in Cmatrix, you can provide some input later on during execution. Those are listed below.
Change Color
Yes, you can change the color of characters while running. But you need to remember some keys and their corresponding color. What to do is, while running Cmatrix, press these keys and the color will change.
Color | Keystroke |
---|---|
Red | ! |
Green | @ |
Yellow | # |
Blue | $ |
Magenta | % |
Cyan | ^ |
White | & |
Black | ) |
Adjust update speed
While running, you can use the number keys from 0 through 9 to change the update speed.
There are other options also, which you can find from the man page of the command.
man cmatrix
Bonus: Cmatrix with lolcat
You can use Cmatrix, in combination with the lolcat command, to make it look more interesting. In Ubuntu, you can install lolcat using:
sudo apt install lolcat
Now, just pipe Cmatrix to lolcat so that you will get a rainbow effect.
cmatrix | lolcat
![Fun With Cmatrix in Linux](https://itsfoss.com/content/images/2023/10/Cmatrix-with-lolcat.png)
Also, try all the above functions of Cmatrix, while piping into lolcat.
Or, you can use an inclined stripe for a rainbow effect, giving another type of experience.
cmatrix | lolcat -p 100
Additionally, you can just invert the background and foreground colors so that your terminal will be filled with colors.
cmatrix | lolcat -i
![Fun With Cmatrix in Linux](https://itsfoss.com/content/images/2023/10/cmatrix-with-inverse-colors.png)
More fun with terminal
I know this is not the most useful Linux command but it’s fun nonetheless and you can have some fun with your Linux system sometime, right?
Cowsay is another such command:
![Fun With Cmatrix in Linux](https://itsfoss.com/content/images/2023/06/cowsay-linux-1.png)
And even more here:
![Fun With Cmatrix in Linux](https://itsfoss.com/content/images/wordpress/2020/04/fun-linux-commands.png)
I let you enjoy it now, Mr. Anderson.