Turn the Terminal into a Matrix-Style Scrolling Screen of Binary or Gibberish

Aug 15, 2013 - 3 Comments

The command line is usually thought of as serious and we usually only cover useful terminal tricks that are fairly advanced, but not everything in the Terminal has to be useful. To prove that, we have three command strings that when pasted into the OS X Terminal, do nothing but scroll screenfuls of random text, binary, or your very own custom message, making your terminal window look a bit like the computer screens from the 1999 movie The Matrix.

Scrolling binary terminal window

For the best looking (i.e. geekiest) results, at least change your Terminal UI settings so that the active window is styled as “Homebrew” or “Pro”, which uses green text against a black background. Or go all out and get a really fancy terminal appearance. Take the Terminal full-screen first if you’d rather have the scrolling Matrix-lookalike take up the entire screen.

Turn the Terminal into a Scrolling Screen of Matrix-Style Gibberish

  • Open Terminal, found in /Applications/Utilities/ or found through Spotlight or Launchpad
  • Copy and paste the following text into the command line prompt:
  • LC_ALL=C tr -c "[:digit:]" " " < /dev/urandom | dd cbs=$COLUMNS conv=unblock | GREP_COLOR="1;32" grep --color "[^ ]"

  • When finished, hit Control+C to end the process, or just close the Terminal window

If you can’t test this yourself or you’re just wondering what it looks like without running it, here is a very short video of what it looks like. The video shows it scrolling choppy but it’s actually really smooth:

Plan on using this often for something or other? Make it an alias by tossing the following into your .bash_profile:

alias matrix='LC_ALL=C tr -c "[:digit:]" " " < /dev/urandom | dd cbs=$COLUMNS conv=unblock | GREP_COLOR="1;32" grep --color "[^ ]"'

Or alias the binary command below instead:

Scrolling Endless Binary in the Terminal

If Matrix-style gibberish isn’t your thing, you can use the following completely different command string to have the Terminal barf out a giant stream of binary instead:

echo -e "1"; while $t; do for i in `seq 1 30`;do r="$[($RANDOM % 2)]";h="$[($RANDOM % 4)]";if [ $h -eq 1 ]; then v="0 $r";else v="1 $r";fi;v2="$v2 $v";done;echo -e $v2;v2="";done;

Just as before, you can cease the binary scrolling by hitting Control+C or closing the Terminal window. Here’s what the binary scrolling looks like:

Admittedly this is pretty pointless but it’s fun, so whether you’re just making your very own DIY terminal-based screen saver, just like the look, or if you want to look super busy doing something amazingly complex when your boss is hovering, have at it.

Scrolling Matrix terminal window

Repeatedly Scroll Anything in the Terminal

Want to customize what’s being scrolled? Use the following command string instead, replacing the area in quotes with anything:

while (true) do echo -n "9A85Y1BF978124871248172487124871248712487124"; done

For example, you could endlessly scroll “OSXDaily.com is the most awesome, amazing, and handsome website” with the following:

while (true) do echo -n "OSXDaily.com is the most awesome, amazing, and handsome website "; done

As usual, Control+C ceases the scrolling.

Thanks to Pete for sending in these modified versions of commands


Related articles:

Posted by: Paul Horowitz in Command Line, Fun, Mac OS, Tips & Tricks


» Comments RSS Feed

  1. Dotty Garrison says:

    Thanks going to try this will come back to give an update.

  2. Stanislav says:

    I dont understand in london please can do in russian?

Leave a Reply


Shop on Amazon.com and help support OSXDaily!

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates

Tips & Tricks


iPhone / iPad



Shop on Amazon to help support this site