Patch into The Matrix at the Linux command line

Recreate the classic look and feel of everyone's favorite 1990s sci-fi movie code scroller with cmatrix.
162 readers like this.
Linux toy: cmatrix

Jason Baker

You've found your way to today's entry from the Linux command-line toys advent calendar. If this is your first visit to the series, you might be wondering what a command-line toy even is? It's anything that's an entertaining diversion at the terminal, be it a game, a fun utility, or a simple distraction.

Some of these are classics, and some are completely new (at least to me), but I hope all of you find something you enjoy in this series.

As we come to the close of another year, it's a good time for looking back, and looking forward. What will 2019 hold for you? What does it mean to be 2019?

I'm reminded that 2019 will mark the twentieth anniversary of one of my favorite science fiction movies from my teenage years, that at the time had me thinking a lot about what the future would hold: The Matrix. For a computer nerd kid like me, it was the ultimate story of a computer programmer rising up and becoming an action hero in a virtual universe by tapping into the power of his mind.

At the time, there was no movie that seemed more futuristic to me; both in the story itself, and in the mesmerizing special effects. Realizing that it was filmed over twenty years ago doesn't change that in my mind.

Bringing it back to our command-line toy for today, let's recreate the downward flowing code of the Matrix at our terminal with cmatrix. cmatrix was an easy install for me, packaged for Fedora, so installing it took simply:

$ dnf install cmatrix

Then, just type cmatrix at your terminal to run.

Linux toy: cmatrix animated

You can find the source code for cmatrix on GitHub under a GPL license.

Do you have a favorite command-line toy that you think I ought to include? The calendar for this series is mostly filled out but I've got a few spots left. Let me know in the comments below, and I'll check it out. If there's space, I'll try to include it. If not, but I get some good submissions, I'll do a round-up of honorable mentions at the end.

Check out yesterday's toy, Winterize your Bash prompt in Linux, and check back tomorrow for another!

What to read next
User profile image.
Jason was an Opensource.com staff member and Red Hatter from 2013 to 2022. This profile contains his work-related articles from that time. Other contributions can be found on his personal account.

8 Comments

That's what I use. For Xfce users download xscreensaver and one of the extra packages that has xmatrix.

Need unicode version for katakana and hiragana like Matrix. ;)

I have tried but it seems Terminal process consumes a lot of CPU, is that normal?

I didn't find cmatrix to consume a lot of CPU, but, I would assume the actual Matrix to be a little heavy on processor load.

In reply to by marco.bravo

On my machine with a normal sized terminal the mate-terminal using about 5% of a CPU and cmatrix less than 1%. Blow that up to a full screen and it goes up to 20% and 2%, respectively.

In reply to by marco.bravo

ah, matrix memories... easy peasy install with homebrew on macOSX!
$brew install cmatrix

To install on uBuntu use the follwing:
sudo apt install cmatrix

Creative Commons LicenseThis work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License.