Not all awesome commands come bundled with terminal and Mac OS out of the box. It is possible to add more commands terminal or even create your own!
Terminal commands are simply programs themselves, or at least an alias to a program or script.
There are many additional commands that you can download and install, of course some of these being useful and others being entertaining!
In this article I have rounded up 10 really cool commands that you can easily add to your Mac OS terminal and you should certainly give them a try!
1. Download Packages: brew
brew <command> <arguments>
If you are using the terminal for anything more than a few simple configuration options, you will likely benefit from the use of a package manager.
Homebrew is a package manager that makes installing software from the terminal very easy. Many of my tutorials that involve the command line make use of it.
brew command is not part of the terminal by default but it can be easily installed with a single terminal command.
Simply copy the following command into the terminal and press return.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
If you have any problems with the installation command above or for general further information, check out this page.
2. Enter The Matrix : cmatrix
Yes it is entirely possible to turn your terminal into the matrix and totally impress your friends! Simply enter the command
cmatrix and your terminal will display a very authentic recreation!
In order to use this command, you must install it first. The easiest way is to use
brew as described above.
brew install cmatrix
3. Download Youtube : youtube-dl
youtube-dl [OPTIONS] URL [URL...]
Tired of using web-based YouTube downloading services that are peppered with ads? This command is awesome! It is easily the quickest and cleanest way to download YouTube videos.
The quickest way to install it is by using
brew install youtube-dl
While installing the command, go ahead and copy the URL of a YouTube video that you wish to download.
Once the brew has finished installing the command we can download the video.
In order to download the video in full quality, simply enter the URL as the primary argument, being sure to use ‘single quotes’ to prevent problems with special characters.
We can also choose different formats for both the audio and/or the video. We can then create a customised download with our chosen formats. To do this, first list the available formats using the
YouTube-dl -F 'https://www.youtube.com/watch?v=Yw6u6YkTgQ4'
This will return a list of all of the different file formats that we can download the video in:
Next we can choose the format that we prefer using the format code. This is achieved by using the
-f flag followed by the
video+audio format code. For example:
YouTube-dl -f 134+140 'https://www.youtube.com/watch?v=Yw6u6YkTgQ4'
This will download the video with 640×320 MP4 video resolution, combining it with M4A 44.1 KHz audio.
There are a whole host of options available so be sure to check out the official manual.
4. Play Tetris : tetris
Tetris in the Mac terminal is surprisingly good, and addictive! Why not give it a try? It is very simple to install using brew:
brew install samtay/tui/tetris
Once the installation is complete, Tetris can be launched from the terminal:
To exit the game, simply press the Q key.
5. ASCII Aquarium : asciiquarium
Ok so this is might not go down in history as the most useful terminal command, however it is surprisingly relaxing and quite impressive! Trust me when I say that you will watch it for longer than you think!
I actually started to run this during a coffee break as a method of taking a break from actual work. It is rather effective for refocusing, therefore it does kinda have some use and I wanted to include it.
It is very simple to install with brew:
brew install asciiquarium
It is just a simple to run from the terminal, just write the command
asciiquarium. You can exit by pressing control + C.
6. Awesome Terminal Text : toilet
toilet [ -hkostvSW ] [ -d fontdirectory ]
I had to include this one just because the name is so funny 😆 but contrary to the name, this command can produce beautiful text in the terminal. You can install it easily with Homebrew:
brew install toilet
If you are writing terminal based programs or scripts, this could be very useful in order to display some cool branding or other important text.
In its basic usage, the toilet command can just be fed some output as the primary variable:
which produces the following output:
Toilet, or TOILet is a progression of FIGLet, which also prints text to the terminal in a similar way. However TOILet has the added option of adding filters to the output.
We can spice this up by specifying a font using the
-f flag. Additional fonts can be used from FIGLet so you might want to install that too.
toilet -f mono12 siytek.com
By default the text is wrapped to 80 lines but we can increase this with the
toilet -f mono12 -w 100 siytek.com
Lastly we can add a filter to the output. To see a list of filters simply type the following command:
toilet --filter list
At the time of writing the following filters are available:
“crop”: crop unused blanks
“gay”: add a rainbow colour effect
“metal”: add a metallic colour effect
“flip”: flip horizontally
“flop”: flip vertically
“180”: rotate 180 degrees
“left”: rotate 90 degrees counterclockwise
“right”: rotate 90 degrees clockwise
“border”: surround text with a border
Lastly can add a filter using the -F flag:
toilet -f mono12 -F gay -w 100 siytek.com
toilet -f mono12 -F border -w 100 siytek.com
7. Snakes On A Game : nsnake
Going back to the topic of terminal games,
nsnake is a must have! All of that old Nokia nostalgia gives me a warm fuzzy feeling. Install with brew:
brew install nsnake
Launch from the terminal and you are good to go!
8. Eat Them Up Yum Yum : myman
Another classic game that has been given the terminal treatment. I have to admit these terminal games are far more addictive than you might think!
It is not really so clear from the screenshots, you should give it a go for sure! Myman really is rather playable! You can install it with brew:
brew install myman
You can launch it simply by entering the command
9. Snakes On A Domain : python
Python is a highly useful tool to have installed on your system. There can be a little confusion surrounding the version, so it is best to think of Python2 and Python3 as separate entities.
You can use brew to install the latest python, which is python3.
brew install python
A great little example that we can use is the simple web server tool, which runs in terminal and allows us to navigate folders via a browser:
python3 -m http.server
Running the server will produce an output that states the address and port, such as something like the following:
$ Serving HTTP on :: port 8000 (http://[::]:8000/) ...
Now we can navigate to
http://localhost:8000 to view the server. Alternatively we can use
http://<ip-address>:8000 and replace with the local IP address of the computer to access from a remote terminal.
10. Watch Star Wars Episode IV
I literally cannot believe someone has done this… there is an ASCII version of the entire Episode IV of Star Wars: A New Hope!
Set aside some time, go to the terminal and type the following:
nc towel.blinkenlights.nl 23
Users of vintage technology with OS versions older than Sierra should use the following instead:
Thanks so much for visiting my site! If this article helped you achieve your goal and you want to say thanks, you can now support my work by buying me a coffee. I promise I won't spend it on beer instead... 😏