CMatrix — Bring The Matrix Digital Rain Effect to Your Linux Terminal.
Ever wanted your Linux terminal to look like the computer screens in The Matrix? CMatrix recreates the iconic falling-character effect directly in your terminal. Learn how to install it, customize its appearance, adjust its speed, and explore its command-line options.
1. What Is CMatrix
Remember the iconic green characters cascading down computer screens in The Matrix?
CMatrix brings the iconic digital rain effect directly to your terminal.
CMatrix is a free, open-source command-line utility that recreates the effect with continuously scrolling characters. Written in C and powered by the ncurses library, it renders the animation directly in the terminal.
Originally developed by Chris Allegretta, it has become a recognizable part of Unix and Linux terminal culture.
Despite its Linux association, CMatrix is not Linux-specific. It also runs on other Unix-like systems, including macOS and BSD.
What does it actually do?
Nothing particularly productive, and that's precisely the point.
CMatrix is a terminal visual effect, not a system monitoring utility, security tool, or background service. It's designed for entertainment, terminal customization, and a little nostalgic hacker aesthetic.
So, what does it look like in action?
Here's a little preview of CMatrix running directly in a terminal.
2. Installing CMatrix
CMatrix is available through the package managers of several popular operating systems. There's no need to compile it manually for a standard installation.
Ubuntu/ Debian
On Ubuntu, Debian, Linux Mint, and other Debian-based distributions, install CMatrix using APT:
$ sudo apt update
$ sudo apt install cmatrixmacOS
CMatrix also works on macOS. If you use Homebrew, installation is straightforward:
$ brew install cmatrixVerify the installation
Once installed, verify that the executable is available:
$ command -v cmatrixYou should see its installation path, typically /usr/bin/cmatrix on Ubuntu.
To check the installed version:
$ cmatrix -V3. Running CMatrix
Now for the fun part.
Launch CMatrix by simply entering:
$ cmatrixYour terminal will immediately transform into a cascading display of characters.
The default configuration uses green characters and continuously scrolling columns.
To exit, press q or use Ctrl+C.
Note: CMatrix occupies the terminal session while running. It doesn't launch a separate graphical application or operate as a background service.
4. Customizing the Matrix Effect
One of CMatrix's interesting features is its collection of command-line options.
You can adjust the scrolling behavior, character appearance, colors, and animation speed without modifying any configuration files.
Change the character color
By default, CMatrix uses green characters. You can change the color with the -C option.
$ cmatrix -C redAvailable colors include:
| Command | Appearance |
|---|---|
-C green | Green |
-C red | Red |
-C blue | Blue |
-C yellow | Yellow |
-C cyan | Cyan |
-C magenta | Magenta |
-C white | White |
-C black | Black |
For example, launch a blue Matrix effect:
$ cmatrix -C blueAdjust the animation speed
Use -u followed by a value between 0 and 9 to adjust the update delay.
$ cmatrix -u 3Lower values produce faster updates, while higher values slow down the animation.
The default update delay is 4.
Enable asynchronous scrolling
Want a more dynamic effect?
Use the -a option:
$ cmatrix -aThis enables asynchronous scrolling, allowing individual columns to move independently rather than following the same scrolling pattern.
Enable bold characters
CMatrix supports two bold-text modes.
Enable partial bold text:
$ cmatrix -bMake all characters bold:
$ cmatrix -BThe -B option overrides the partial bold mode.
Combine multiple options
You don't have to use these options individually.
For example:
$ cmatrix -a -b -u 3 -C greenThis configuration enables asynchronous scrolling, partial bold characters, a faster update delay, and green text.
5. Interactive Keyboard Controls
CMatrix also supports changing certain visual settings while the animation is running.
You don't necessarily have to stop the program and relaunch it to experiment with different effects.
| Key | Action |
|---|---|
a | Toggle asynchronous scrolling |
b | Enable random bold characters |
B | Enable all bold characters |
n | Disable bold characters |
0–9 | Adjust animation speed |
! | Change color to red |
@ | Change color to green |
# | Change color to yellow |
$ | Change color to blue |
% | Change color to magenta |
^ | Change color to cyan |
& | Change color to white |
) | Change color to black |
q | Quit |
These interactive controls are unavailable in screensaver mode (-s).
6. Using CMatrix as a Terminal Screensaver
CMatrix includes a dedicated screensaver mode.
Launch it using:
$ cmatrix -sIn this mode, the animation continues until you press any key.
Unlike the default mode, you don't need to use Ctrl+C to terminate it.
This makes it useful for demonstrations, idle terminal displays, or simply leaving a terminal window running for visual effect.
CMatrix doesn't improve performance or security, but it brings a touch of The Matrix to your terminal. It's lightweight, easy to use, and a fun little addition for Linux enthusiasts and terminal lovers.
We hope this was helpful.
Keep learning. Keep exploring. Stay thirsty.