Since the past 3 weeks, I’ve hopefully marinated your brain with all the Linux goodness that you could ever want and like the popular saying “everything good must come to an end”, it’s finally time to wrap up this series too.
If this is your first time here, you should probably go over part 1, 2 and 3 before getting into this post. Part 1 covered the basics of Linux, the installation and some of the simple commands, Part 2 built on top of Part 1 and we covered file handling, processes etc and in Part 3 we covered the system administration side of things.
This is the final one and this is definitely going to be the most fun one yet. We are gonna pull out our tricks gun for this one and it’s gonna be an open fire!
Here’s what we’ll cover in this post. Brace yourself as the list is really long. Ready?
- Easter Eggs
That’s right there’s only going to be cool Linux terminal Easter eggs and tricks in this one so let’s get started without any more delays.
1. moo: Unleashing the terminal cows
Apart from being popular for being freely available, Linux is also quite popular for it’s unusual attraction to cows. There are multiple places in the operating system where you would run into cows. We’ll limit ourselves to the terminal.
On Linux, we use apt (Advanced Packaging Tools) to install updates and utilities. But if you are curious enough you’ll find a good number of easter eggs throughout the system.
Issue the command apt help and scroll to the end. You’ll find the line This APT has Super Cow Powers. Which is an obvious hint at an easter egg.
Back in the terminal type:
And there you go, you’ve discovered one of the first easter eggs. We started off with apt because you’re gonna use it probably for every command (assuming this is your first time trying it out).
Now that we’ve unleashed the cows, let’s see what tricks they can perform.
2. cowsay: Let the ASCII cow talk!
Alright, let’s make our beautiful ASCII friend speak, in the terminal window I mean. There’s a command that will allow you to make a cow say whatever want it to say. All you need to do is pass in your message after the cowsay command.
NOTE: If this is your first time running this command then instead of showing you the output right away, the terminal will prompt you with a message saying that the program is unavailable. And it would also print out how you can install it.
For most programs on this list, you will be able to install it using the apt command. The format for all of them would be:
apt install PROGRAM_NAME
Once done, just reinvoke the command as follows. And an ASCII cow would show up with your message.
Pretty cool right?
There a couple of ways you can configure the cowsay command, but for the sake of brevity I’m gonna let you man it out.
3. fortune cowsay: The cows are wise
Our ASCII cow friend was so far just able to blurt out the messages we supplied, but wouldn’t it be crazy cool to have it do something more “intelligent”? How about we make it tell our fortune? Now, I can’t bet on the accuracy of the prediction, but I can bet that this will definitely help to lighten the mood a bit.
Here’s how you can ask the ASCII cow to tell your fortune.
Again, if this is your first time running this program, which I would suspect it is, the terminal will prompt you to first install the program. You can follow the on-screen instructions to do so.
Once you have the right programs installed, issue the following command and hit enter.
fortune | cowsay
This is what is returned.
It’s really fun to have the cow print an interesting adage. But what’s more interesting is that we’re taking the output of the fortune command and supplying it as an input to the cowsay command. The | that you say in the middle is called a pipe and it’s used to redirect the output of one command to another command as its input. It’s almost like the redirection operators we saw in Part 2 but this works for communicating data between commands.
4. aptitude cowsay: The hidden dead elephant
With apt’s affinity towards cows, you might be wondering if other tools have these easter eggs. To save you the trouble of hunting them down let me answer that question for you. Yes, they do. Aptitude is another apt tool (a rather more user-friendly one) which packs in an easter egg which is a rather interactive one.
Type in the following:
And as you can see, it says we don’t have any easter eggs in this program, which I find hard to believe. So let’s try out one more time but let’s be a little persistent. Ok? Cool here we go:
aptitude -v moo
Well, it is still saying there’s no easter egg. I think we need to be more firm. Let’s try till it finally gives in.
Well, this was fun, wasn’t it? I do feel sad for the elephant though.
5. nmap: The Hacker Man simulator
We all have tried to pull off a brag or tried impressing someone by typing something on to the terminal and having it print out something cool, haven’t we? Well be it to look cool in front of your friend or to impress your crush, the ls and ping command won’t take you too far. Let’s step up the game and pretend to be a real pro.
Type out the following command and put your shades on.
nmap -oS - google.com
nmap is, however, is a really useful tool for things like port scanning and penetration testing so do not take this program for a joke. It’s defined cool to see some leet-speak on the terminal though.
6. lolcat: Make the terminal colorful again
So far whatever we’ve seen has been pretty darn boring grey. No, I don’t mean the mood I’m literally talking about the color Let’s add some color to the console and spice things up a bit shall we?
For reference, we’ll again use the fortune program for the text output. Type the following out and what your terminal get some poppy colors.
fortune | lolcat
We can pipe out the output of any command imaginable to the lolcat program. I’ve added a sample down below:
Alright let’s keep moving.
7. sl: A Steam Locomotive for your typos
How many times has it been that you wanted to type out a particular commands but you ended up typing something totally different? Happens to me all the time.
One of my most common ones would be misspelling gut for gti. It’s become so regular of an occurrence that I’ve created an alias for git as gti (not sure what’s an alias? Check out part 3).
While most of the time the terminal will scream at you for typing something incorrectly, there’s a command which will actually show you an easter egg if you made a typo. sl which is the typo for ls is an actual terminal command that will animate a steam engine on your screen when you type it as you can see below.
It also has options which I would encourage you to check out on yourself own.
8. telnet: Watch Movies in ASCII
Alright! Fans of the Force, this one is for you. And for people who didn’t get that phrase, I’m talking about Star Wars here. I for one am a huge Star Wars nerd and when I came across this easter egg, it blew me away. Did you know you could run an entire screening of Star Wars Episode IV on your terminal? In ASCII?
Well if you didn’t, be prepared to have your socks knocked off.
Just type the following command and hit enter. And now all you need is some popcorn.
Sweet right? If this doesn’t impress your friends you probably need to look for new ones.
9. cmatrix: Neo is in your terminal
Keeping the nerd spirit alive let’s see how we can turn our regular boring grey terminal into the matrix visualization and see the world from Neo’s eyes, shall we?
The command is called cmatrix and once you type its name and hit enter. The terminals will become a matrix just like the one Neo saw.
10. yes: We Can!
Let’s close off the series on some positive and motivational note. And the smallest most powerful and uplifting word there is is YES. Yes has the power of enabling you to do the unthinkable and make you fearless. Let’s type in yes into the terminal along with a quote of your choice. And now let’s absorb all the positive energy there is (until your terminal crashes).
Alright, folks, we’ve come to the end of part 4 and finally, to the end of the Linux Hands On series as well. It was indeed a fun experience planning out this series and then sharing it with you. Ourselves end goals was to give you a quick intro to Linux and some terminal commands so that you get to a point where the terminal no longer intimidates you. Once you get to that stage, it honestly doesn’t take too much of effort to self-learn the more complex concepts. We hope you will find the series helpful and based on your feedback we will decide on covering more monthly series like this. Stay connected!
What people are saying
This was very fun. I have followed this series completely and you have taught better than they did in my college. Please make more guides like this in future. It is very helpful for the reader.