Make ASCII art, talk to your computer and play text adventures. Your Linux command line isn’t just for work: it can be weirdly entertaining, if you know the right commands.
Joel showed you the basics of using the command line An A-Z of Linux - 40 Essential Commands You Should Know An A-Z of Linux - 40 Essential Commands You Should Know Linux is the oft-ignored third wheel to Windows and Mac. Yes, over the past decade, the open source operating system has gained a lot of traction, but it’s still a far cry from being considered... Read More , and you should absolutely read that article. But part of the problem of learning the command line is that, at first, it’s boring. Changing directories and moving files around just doesn’t seem that interesting.
Whether you’re looking to make things a little more interesting for yourself, or want to show off a few cool tricks to someone you’re trying to teach, here are a bunch of quirky commands that make the command line more fun. Enjoy!
Note: most of these commands need to be installed before you can use them – I’ve included the Ubuntu command for installation at the bottom of each section (which also work for Linux Mint, ElementaryOS and other Ubuntu-based distros). Instructions for other distros will vary, but package names are usually the same.
View Any Image as ASCII
Open any image file, as ASCII art. It’s as simple as the following command:
asciiview file.jpg
Neat, huh? You can press “s” to save your image as a text file, for future use.
You’ll need to install two packages for this: aview
and imagemagick
. On Ubuntu, type this:
sudo apt-get install aview imagemagick
Make ASCII Banners
Spend enough time on the web and you’ll see them: ASCII banners. Letters being stacked to create even bigger letters, letting you add banners in plaintext areas like Reddit’s comments.
If you’d like to make your own such banners, you need to know the right commands. Figlet
is the go-to command for many.
That’s simple, right? You can dig a bit deeper, if you like. Type showfigfonts
to see a complete list of installed fonts, complete with examples of how they look. To use them, insert -f fontname
between figlet
and your text.
sudo apt-get install figlet
Make Your Computer Talk
We showed you how you can make your Mac talk to you Your Mac Can Read Any Text To You, Here’s How Your Mac Can Read Any Text To You, Here’s How Whether you want to hear an article while you do something else or want another voice to read your writing back to you for proofreading purposes, OS X comes with everything you need. Read More , but did you know you can also do this from the Linux command line? The command is pretty simple, too:
espeak "I can say anything"
It’s straight-forward, but you can dig into more options by looking at the manual.
sudo apt-get install espeak
Get a Random Fortune…
This one pops up in every article like this, but it’s too fun to leave off the list. Type fortune
and you’ll see a random quote, or fortune-cookie-type prediction.
It’s kind of stupid, sure, but sometimes you need a quick diversion. If you find the output a little bland, you can specifically request something offensive with the following command:
fortune -o
MakeUseOf is not responsible for what you read after typing this, use at your own risk.
To install:
sudo apt-get install fortune
To install the offensive fortunes:
sudo apt-get install fortunes-off
…As Spoken by a Cow
Another seemingly mandatory command in articles like this is cowsay
, which makes a cow say things. No, seriously: that’s it.
It’s completely pointless, but also strangely amusing. Reading the manual and looking at all the options (-w
to make the cow wink!) is a great introduction to how command line arguments work, though. And combining cowsay
with fortune
teaches you another concept: piping. Here’s how it works:
fortune | cowsay
The “|” (the straight line above the Enter key on your keyboard) sends the output from fortune
to cowsay
, resulting in the cow telling you what your fortune is. Pointless, but rewarding.
sudo apt-get install cowsay
Matrix Effect
Kids: back in the late 90s, there was a movie called The Matrix that seemed awesome at the time. In it, computers had a bunch of seemingly random green code on them – and we’ve been trying to replicate it ever since. cmatrix
is a quick way to make your command line look like this.
Use responsibly, and remember: there were no sequels.
sudo apt-get install cmatrix
Correct a Common Typo
The command ls
shows you the contents of the current directory, meaning most command line junkies use it a lot. It’s really easy, however, to type sl
instead. This program animates a steam locomotive going across your screen whenever you do that.
If you’re going to make a mistake, the result might as well be hilarious. A must-have for anyone learning the command line.
apt-get install sl
Randomly Generate a Fake Identity
This is fun: type rig
in the command line and it will output a fake address and phone number.
sudo apt-get install rig
Play Text Adventure Games
I’m a big fan of text adventure games
5 Great Interactive Fiction Games You Can Play Online Right Now
5 Great Interactive Fiction Games You Can Play Online Right Now
Interested in the genre of text-based adventure games? Want to try playing a text-based game? Here are several you can find online right now!
Read More
, and playing them from the command line is simple with a program called frotz
. You’ll need some games to play first, of course: this site offers all of Infocom’s classic titles, and the IFwiki offers plenty more.
Download them, then point your terminal to the folder where they’re located. Type frotz filename
to open your game.
sudo apt-get install frotz
What Other Weird Commands do You Know?
We’ve shown you dangerous commands that you should never run 9 Lethal Linux Commands You Should Never Run 9 Lethal Linux Commands You Should Never Run You should never run a Linux command unless you know exactly what it does. Here are some of the deadliest Linux commands that you'll, for the most part, want to avoid. Read More ; I hope the above list was a little less scary for you. But I want to know: what commands did I miss? Point out the funnest Linux commands you know about in the comments below, okay? Operating system easter eggs 10 Fun & Surprising Operating System Easter Eggs 10 Fun & Surprising Operating System Easter Eggs Find hidden hilarity and otherwise odd stuff, built right into the operating system you're using. They're hiding in plain site, in software you use every day, and when you find them you'll be delighted –... Read More are always welcome.
Oh, and before any of you guys point it out:
telnet towel.blinkenlights.nl
lets you watch a ASCII version of Star Wars. You’re welcome.
There is also a thing with the terminal that will insult you every time you make a mistake, not sure of the name right now. You can also go to the extreme and use suicide linux that will format your drive when you make a boo-boo.
There's bb. Pretty wierd video when you press N at the start.
banner
Some of the Info com. Files are archived . Use unrar e to extract data files.
xcowsay is actually the best, most flexible notification program I have found. Check its manpage, it has lots of options to control image, placement, etc. And here's a figlet alias:
alias watch-time='watch -t -n 1 "date +%A%n%D%n%Z%t%t%T|figlet -k"'
How do you get the ascii art to save to the drive? I can open the menu, and enter a file name, but then can't find it anywhere.
It's going to save into whatever directory your prompt is in when you run the command, if you haven't changed directories that's probably the home folder.
Try:
# aptitude moo
and increase verbosity every time ;)
Classic.
mplayer -vo aa video.avi
Will show you video.avi in ascii.
That's a great one! Pointless, but great.
cmatrix.. +1.. Thank you :)
Yes, thanks, I am still a beginner, but I finally figured it out. Still have a lot to learn!
Glad you got it working!
these programs won't install. They try to install from a closed argonne mirror.
Perhaps add them to your repositories?
Have you checked your mirror settings? These are all programs that come in the standard repos, and if you're having trouble installing them I think there might be a problem with your package manager.