cmatrix simulates the digital rain seen in The Matrix movies, streams of characters scrolling down the screen, right inside a terminal window. It was written by Chris Allegretta in 1999 and is now maintained on GitHub, built on the ncurses library so it runs on virtually any POSIX system.
It serves no practical computing purpose. It exists to make your terminal look good, to fill an empty screen at a hackerspace, or to relive a piece of late-90s internet culture whenever you type one word.
Original author
Chris Allegretta
First released
1999
Built with
C, ncurses
Platforms
Linux, macOS, BSD, Unix
License
GNU GPL, free & open source
Command
cmatrix
Customization
Small tool, a surprising number of dials
Every visual detail can be tuned from the command line, and most of it can be changed live while cmatrix is already running.
-C
Eight colors
Switch between green, red, blue, yellow, cyan, magenta, white, or black at launch.
-u
Update speed
Set the screen refresh delay to make the rain crawl or sprint down the terminal.
-a
Async scroll
Let columns fall independently for the chaotic look from the original film.
-b / -B
Bold text
Mix in bold characters, or make every character bold for a heavier look.
-s
Screensaver mode
Run until any key is pressed, ideal for an idle terminal or a demo screen.
-l
Console font
Use the Linux console matrix.fnt font for the closest match to the movie.
cmatrix pros and cons
Should you install cmatrix? Here's the honest answer
cmatrix is a tiny program, so there isn't much to weigh, but here's exactly what you get and what you don't before you run the install command.
+
Pros of cmatrix
Fully open source. Released under the GPL, the actual C source is public on GitHub for anyone to read, audit, or modify.
Already packaged for you. It ships in the default repositories of Ubuntu, Debian, Fedora, and Arch, and is available via Homebrew on macOS, no manual compiling needed.
Everything is a flag, not a config file. Color (-C), speed (-u), boldness (-b/-B), and async scroll (-a) are all set at launch, with nothing to configure beforehand.
One lightweight binary. Built on ncurses with no GUI toolkit, background service, or network access required to run.
Doubles as a real screensaver. The -s flag runs it continuously and exits cleanly on any keypress, useful for an idle kiosk or demo terminal.
Still actively maintained. Over 25 years after its 1999 release, it still builds cleanly on current Linux, macOS, and BSD systems.
−
Cons of cmatrix
No computing function. It doesn't monitor, automate, or process anything, it's purely a visual effect by design.
Can spike CPU usage. Low -u values redraw the screen fast enough to keep a full core busy, noticeable on a Raspberry Pi or older laptop.
The -l font is console-only. The Linux console matrix.fnt look only renders correctly on an actual tty, not inside GNOME Terminal, iTerm2, or most emulators.
No official Windows build. Running it on Windows means going through WSL or another POSIX compatibility layer first.
Colors depend on your terminal. The same -C flag can render differently depending on your terminal emulator's TERM setting and color support.
Blocks the terminal it's in. It occupies that window until you exit with Ctrl+C, or a keypress if launched with -s.
Get started
Install cmatrix in one line
Pick your platform. For most people, the official package manager route below is the right call; build from source only if you specifically want the latest commit from GitHub or your system has no cmatrix package at all.
Installs from the official Ubuntu/Debian repositories via APT. Dependencies (ncurses) are resolved automatically, and the package is signed and checked like any other system package.
Repo version can lag behind the latest GitHub release
Version varies between Ubuntu/Debian releases
Fedora ships cmatrix directly in its default repositories, so DNF can install it without adding RPM Fusion or any third-party repo.
sudo dnf install cmatrix
Pros
No extra repositories needed
Fast install, handled entirely by DNF
Easy to remove with sudo dnf remove cmatrix
Cons
Tied to Fedora's release cycle, so brand-new features arrive late
Not pre-installed, so it still requires root access
Arch's rolling-release model means Pacman's cmatrix package tends to track upstream closely, so you get new releases sooner than on fixed-release distros.
sudo pacman -S cmatrix
Pros
Usually the newest stable version available via a package manager
Minimal, no bloated dependency chain
Cons
Assumes you're already comfortable maintaining an Arch system
Rolling updates can occasionally introduce breaking changes system-wide
Homebrew builds and installs cmatrix from its formula, pulling in ncurses if it isn't already present on your Mac.
brew install cmatrix
Pros
Simplest path for macOS, one command
Homebrew tracks updates and handles clean uninstalls
Cons
Requires Homebrew to already be installed
First-time Homebrew setup on a fresh Mac takes a few extra minutes
Clones the official GitHub repository and compiles it locally with CMake. This is the only route that gives you the exact latest commit, and the only one that works if your system has no cmatrix package at all.
git clone https://github.com/abishekvashok/cmatrix.git
cd cmatrix
mkdir build && cd build
cmake ..
make
sudo make install
Pros
Always the newest code, including unreleased fixes
You can read and modify the source before installing
Works even where no package exists for your OS
Cons
Requires build tools: git, cmake, make, a C compiler
No package manager to track or update it later
More steps, more room for a misconfigured environment
Once installed, run it with just the command name:
cmatrix
Reference
Common flags
Combine flags to shape the effect. For the closest match to the movie, run cmatrix -lba.
Flag
Effect
-a
Asynchronous scroll, columns fall at independent speeds
-b
Partial bold text mode
-B
All-bold text mode
-C [color]
Sets the character color, default is green
-l
Uses the Linux console matrix.fnt font
-o
Old-style scrolling, closer to the Windows/macOS screensaver
-s
Screensaver mode, exits on any keypress
-u [0-9]
Sets the update delay; lower numbers scroll faster
FAQ
Questions people actually ask
What is cmatrix used for?+
Nothing practical, by design. It's a terminal screensaver and a piece of visual flair for anyone who wants their command line to look like the movie.
Is cmatrix safe to install?+
Yes. It's open source, ships in the official repositories of nearly every major Linux distribution, and is available via Homebrew on macOS.
How do I stop it once it's running?+
Press Ctrl+C. In screensaver mode (-s), any key press will exit.
Can I change the color and speed?+
Yes, use -C followed by a color name, and -u followed by a number from 0-9 to control the update delay.
Does it run on macOS and BSD?+
Yes. It's built on ncurses, so it runs on any POSIX-compliant system, including macOS via Homebrew and most BSD variants.
The cmatrix guide
Eight things worth knowing about cmatrix
Where it came from, how it works, how it stacks up against other terminal toys, and how to get more out of it.
Origins
The history of cmatrix: a late-night side project that outlived its era
cmatrix traces back to 1999, when developer Chris Allegretta built it as a compact side project inspired by the promotional screensaver that once accompanied The Matrix online. Written against the ncurses library, it was simple enough to put together quickly, yet flexible enough from its first version to support adjustable speed, bold text, and basic color.
Over the following two decades, maintenance passed through a small circle of contributors before settling into the actively maintained GitHub repository it lives in today. It never gained any practical computing purpose, and that was never the point. What kept it alive was timing: it captured a specific late-90s moment in film and internet culture well enough that installing it still reads as an inside joke every new generation of terminal users discovers on their own.
Filed under: history
How it works
How digital rain effects actually work under the hood
The trick behind cmatrix, and every clone of it, is simpler than it looks. Each column on screen holds a falling "head" character that gets redrawn one row lower on every tick, while the rows above it are gradually dimmed instead of erased. That fade is what gives the trailing streak its glow, rather than a hard-edged line of text dropping down the screen.
Two settings decide most of the personality of the effect. Synchronous mode moves every column in lockstep, which reads as more mechanical and closer to how the original film screensaver looked. Asynchronous mode, turned on with -a, lets each column pick its own pace, producing the busier, less uniform rain most people associate with the movie itself. Update delay controls how often the whole grid refreshes, and bold flags simply mix in heavier character weights along the trail for extra contrast.
Filed under: how it works
Reference
cmatrix flags, explained properly: a practical walkthrough
Most people run cmatrix once with no flags, watch it for ten seconds, and move on. The flags are where it gets more useful. If you want the closest match to the film's screensaver, cmatrix -lba combines the Linux console font, partial bold text, and asynchronous scrolling in one line, though the -l font only renders correctly on an actual Linux console rather than most terminal emulators.
For a calmer, more legible look on a desktop terminal, drop -l and pair -C with a color name and -u with a number from 0 to 9 to tune speed to taste, lower numbers fall faster. If you're setting cmatrix up as an idle-screen display on a shared machine, -s is the flag that matters most: it runs continuously and exits the moment someone presses a key, instead of requiring a deliberate Ctrl+C.
Filed under: usage
Comparison
cmatrix vs other terminal eye candy: how it actually compares
cmatrix isn't the only "useless but fun" terminal program, just the most famous one. Asciiquarium swaps falling code for an animated ASCII fish tank, aimed squarely at charm rather than nostalgia. Hollywood takes a different angle entirely: instead of one effect, it fills a terminal with several panes of fake logs, progress bars, and hex dumps to simulate the exaggerated "hacking" scenes Hollywood films love, more parody than homage.
Closer to home is unimatrix, a Python reimplementation of the same digital rain idea with more flexibility around custom character sets and Unicode symbols, at the cost of needing a Python environment instead of a single compiled binary. If you specifically want the original film's look with minimal setup, cmatrix remains the simplest choice; if you want a wider character palette or plan to hack on the code yourself, unimatrix is worth a look.
Filed under: comparisons
Project idea
Turning a spare Raspberry Pi into a matrix rain display
An old Raspberry Pi and a small secondhand monitor are enough to build a dedicated ambient display, and cmatrix is a natural fit for it since it needs almost no resources to run continuously. Install a lightweight Linux distribution, skip the desktop environment entirely, and set the Pi to boot straight to a console login.
From there, adding a single line to the shell's startup file that launches cmatrix -s after login turns the whole boot sequence into a one-purpose kiosk: power on, and the rain starts automatically, exiting cleanly with any keypress if you ever need the console back. Mounted in a repurposed picture frame or tucked into a bookshelf, it makes a genuinely low-cost piece of desk decor out of hardware that would otherwise sit in a drawer.
Filed under: projects
Culture
Why developers still bother with terminal toys in 2026
Programs like cmatrix have no business surviving this long in professional environments built around efficiency, yet they keep showing up in dotfiles repositories and fresh machine setups year after year. Part of the answer is that a terminal is one of the few remaining spaces developers fully control, down to the font and color of every character, and small joke-programs are an easy way to put a personal signature on that space.
The other part is simpler: software work is mentally demanding for long stretches, and a five-second glance at falling green text between tasks costs nothing while still functioning as a tiny, deliberate break. None of it makes anyone more productive in a measurable sense, and that's fine, it was never trying to.
Filed under: culture
Setup
Building a terminal setup you actually enjoy opening
cmatrix rarely lives alone in a serious terminal setup, it tends to sit alongside a handful of other small tools that together shape how a workspace feels. A system-info tool like neofetch or fastfetch prints a quick hardware summary next to some ASCII art on login, a custom prompt such as starship adds context like git branch and command status, and a Nerd Font fills in the icons those tools expect.
None of these pieces do much alone. Stacked together with a color scheme you actually chose on purpose, they turn a default black-and-white shell into something that feels considered, and cmatrix fits naturally into that stack as the purely decorative layer on top, called manually rather than run constantly.
Filed under: setup
Troubleshooting
Troubleshooting cmatrix: fixing the most common errors
Almost every cmatrix problem falls into one of three buckets. Building from source and seeing an error about a missing ncurses.h header means the development library isn't installed yet, on Debian-based systems sudo apt install libncurses5-dev resolves it before you re-run cmake.
If cmatrix runs but every character shows up in a single flat color regardless of the -C flag, the terminal's TERM environment variable usually isn't set to something that advertises color support, setting it to xterm-256color before launching fixes most cases. Garbled or missing characters specifically in -l mode almost always means you're running it inside a terminal emulator rather than a real Linux console, since that font mode only renders correctly on the console itself. And any "permission denied" during installation is simply a missing sudo in front of the package manager command.
Filed under: troubleshooting
Legal
Privacy Policy
Last updated: July 2026
This page explains what happens with your data when you visit this website. In short: almost nothing is collected.
What we don't collect
This site does not use tracking cookies, does not run advertising scripts, and does not ask you to create an account, log in, or submit personal information anywhere on the page.
What may be collected automatically
Like almost any website, the server or hosting provider delivering this page may automatically log basic technical information for security and performance purposes, such as:
IP address and approximate location
Browser type and device information
Pages visited and time of visit
This is standard server-log data, not something this site actively gathers, stores, or sells.
Third-party links
This page links to external sites, including GitHub and Homebrew, so you can install cmatrix. Once you leave this site, that third party's own privacy policy applies, not this one.
Changes to this policy
If this policy is updated, the revised version will simply replace this one on the same page, with the "last updated" date above reflecting the change.
Legal
Terms of Use & Disclaimer
Last updated: July 2026
By using this website, you agree to the points below. They're written in plain language on purpose.
Not an official cmatrix or Matrix property
This is an independent, fan-made informational site about the open-source cmatrix terminal program. It is not affiliated with, endorsed by, or officially connected to the cmatrix maintainers, GitHub, Warner Bros., or any rights holder of The Matrix film franchise.
Third-party software, used at your own risk
cmatrix itself is free, open-source software distributed under the GNU GPL by its own maintainers. This site only provides information and installation instructions. Any software you install by following the commands on this page is installed at your own discretion and risk, under that software's own license terms.
No warranty
Information on this page is provided "as is," without warranty of any kind. While every effort is made to keep install commands and flag references accurate, we don't guarantee this content is error-free or that it matches every version of cmatrix on every system.
External links
Links to GitHub, Homebrew, and package repositories are provided for convenience. We aren't responsible for the content, security, or availability of those external sites.
Contact
Questions about this site can be directed to the maintainers through the source repository linked in the footer below.