Linux/Unix desktop fun: Simulates the display from “The Matrix”

The Matrix is a science fiction action movie from 1999. It was written and directed by the Wachowski Brothers. The film has falling green characters on screen. The digital rain is representing the activity of the virtual reality in “The Matrix.” You can now have Matrix digital rain with CMatrix on a Linux or Unix terminal too.


Install cmatrix

Install and setup CMatrix as per your Linux/Unix version.

How to install cmatrix on a Debian/Ubuntu Linux

Type the following apt-get command/apt command on a Debian/Ubuntu/Mint Linux:
$ sudo apt install cmatrix
Sample outputs:

[sudo] password for vivek: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
The following NEW packages will be installed:
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 15.8 kB of archives.
After this operation, 50.2 kB of additional disk space will be used.
Get:1 artful/universe amd64 cmatrix amd64 1.2a-5build2 [15.8 kB]
Fetched 15.8 kB in 0s (19.7 kB/s)
Selecting previously unselected package cmatrix.
(Reading database ... 205388 files and directories currently installed.)
Preparing to unpack .../cmatrix_1.2a-5build2_amd64.deb ...
Unpacking cmatrix (1.2a-5build2) ...
Setting up cmatrix (1.2a-5build2) ...
Processing triggers for man-db ( ...

Installing cmatrix on an Arch Linux

Execute the following pacman command:
$ sudo pacman -S cmatrix

FreeBSD install cmatrix

To install the port run:
# cd /usr/ports/misc/cmatrix/ && make install clean
OR add the binary package using the pkg command # pkg install cmatrix

macOS Unix desktop install cmatrix

Type the following brew command:
$ brew install cmatrix

OpenBSD install cmatrix using the pkg_add

Run the following pkg_add command:
# pkg_add cmatrix

Fedora Linux installation

Try the following dnf command:
$ sudo dnf install cmatrix

Alpine Linux install cmatrix

Use the following apk command:
$ sudo apk add cmatrix

(1/1) Installing cmatrix (2.0-r0)
Executing busybox-1.31.1-r19.trigger
OK: 16 MiB in 29 packages

Using cmatrix

Simply type the following command at your shell prompt:
$ cmatrix

cmtarix in action Simulates the display from

cmtarix in action

Using keyboard

The following keystrokes are available during execution (unavailable in -s mode):

KEYSTROKES Description
a Toggle asynchronous scroll
b Random bold characters
B All bold characters
n Turn off bold characters
0-9 Adjust update speed
! @ # $ % ^ & ) Change the color of the matrix to the corresponding color: ! – red, @
green, # – yellow, $ – blue, % – magenta, ^ – cyan, & – white, ) – black.
q Quit the program

You can pass the following option to the cmatrix command:
$ cmatrix -h
Sample outputs:

 -a: Asynchronous scroll
 -b: Bold characters on
 -B: All bold characters (overrides -b)
 -c: Use Japanese characters as seen in the original matrix. Requires appropriate fonts
 -f: Force the linux $TERM type to be on
 -l: Linux mode (uses matrix console font)
 -L: Lock mode (can be closed from another terminal)
 -o: Use old-style scrolling
 -h: Print usage and exit
 -n: No bold characters (overrides -b and -B, default)
 -s: "Screensaver" mode, exits on first keystroke
 -x: X window mode, use if your xterm is using mtx.pcf
 -V: Print version information and exit
 -u delay (0 - 10, default 4): Screen update delay
 -C [color]: Use this color for matrix (default green)
 -r: rainbow mode
 -m: lambda mode


You now have the coolest terminal app! Grab the source code here.

🐧 Get the latest tutorials on SysAdmin, Linux/Unix, Open Source & DevOps topics via:
CategoryList of Unix and Linux commands
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04

6 comments… add one
  • K. de Jong Jan 4, 2018 @ 16:55

    And also on Fedora with `dnf in cmatrix`.

  • Goku Jan 14, 2018 @ 8:33

    works perfect, seen this before had to give it a try and it was awesome using cmatrix -b

  • KZL Jan 18, 2018 @ 14:06

    cmatrix on a higher speed is very CPU intensive (written in its manual too) and so a great tool to stress the processor

  • Tracer Feb 7, 2018 @ 12:00

    This is simply amazing!

  • Neo Aug 25, 2020 @ 11:25

    I am neo and I like this curses-based scrolling ‘Matrix’-like screen <3

Leave a Reply

Your email address will not be published. Required fields are marked *

Use HTML <pre>...</pre>, <code>...</code> and <kbd>...</kbd> for code samples.