Free & open source · since 1999

$cmatrix

The classic terminal program that turns your command line into the falling green code from The Matrix. One command, zero setup, endless digital rain.

bash — 80×20
$
What it is

A screensaver for people who live in the terminal

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.

sudo apt update # refresh package lists sudo apt install cmatrix

Pros

  • One command, no manual dependency handling
  • Maintained and security-checked by the distro
  • Clean removal later with sudo apt remove cmatrix

Cons

  • 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.

FlagEffect
-aAsynchronous scroll, columns fall at independent speeds
-bPartial bold text mode
-BAll-bold text mode
-C [color]Sets the character color, default is green
-lUses the Linux console matrix.fnt font
-oOld-style scrolling, closer to the Windows/macOS screensaver
-sScreensaver 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.

C:\> RUN CMATRIX.EXE_ 01001101 01000001 10101 ハミ ムメ 0101 01011010 ヲアウエオカ 11000101 マミムメモ 1999 - CHRIS A. 01110011 ラリワ 01 ncurses.h loaded 10010 タツテナニ 1101
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

701 0 1 01 1 0 10 ソ1 0 1 0 1 0
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

bash $ cmatrix -l -b -a # -l linux console font # -b partial bold trail # -a independent columns $ cmatrix -C cyan -u 2 # -C sets color · -u sets speed (0-9) $ cmatrix -s # screensaver mode, exits on any key
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

cmatrix 1010ハミ01アウエオカ10タツテナ0110 asciiquarium hollywood unimatrix (python) 10アウ01ハミ10エオ01タツ10カキク011テナニ010ケコ10サ
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

ア 01 ハ 10タ 11 エ 00キ 01 ヒ 10 ニ 10 セ 01ヤ 00 ワ 1110 ヲ 01 ケ raspberry pi
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

$ cmatrix &$ code .
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

➜ ~/dotfiles git:(main) os: arch · shell: fish wm: i3 · term: alacritty cpu: 8-core · mem: 12g ア01ハ エオ10 タ11キヒ10ニ セ01ヤ ワ00ヲ 01ケホ マミ10 ムメ01モ10ラ リ01ワ 10ヲ01
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

error: ncurses.h: No such file or directory fix → sudo apt install libncurses5-dev warn: TERM not recognized, colors disabled fix → export TERM=xterm-256color error: permission denied fix → rerun the install command with sudo
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

This page explains what happens with your data when you visit this website. In short: almost nothing is collected.

Legal

Terms of Use & Disclaimer

By using this website, you agree to the points below. They're written in plain language on purpose.