If you’re ever bored, this post covers some fun shell commands!

sl

sl, short for “Steam Locomotive” is a fun little command that

display[s] animations aimed to correct users who accidentally enter sl instead of ls.

It can be installed with:

sudo apt install sl

and has some cool options. My personal favorite is:

sl -alF

which makes a smaller, flying train appear on your screen. By default, ctl + c won’t work, so I like to create an alias:

alias sl="sl -e"

which makes it less annoying.

cal

I bet you didn’t know you could print a calendar from bash! Just use the cal command, and you’ll get something like:

      May 2018        
Su Mo Tu We Th Fr Sa  
       1  2  3  4  5  
 6  7  8  9 10 11 12  
13 14 15 16 17 18 19  
20 21 22 23 24 25 26  
27 28 29 30 31        

or, you can print the whole year with cal -y:

     January               February               March          
Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa  
    1  2  3  4  5  6               1  2  3               1  2  3  
 7  8  9 10 11 12 13   4  5  6  7  8  9 10   4  5  6  7  8  9 10  
14 15 16 17 18 19 20  11 12 13 14 15 16 17  11 12 13 14 15 16 17  
21 22 23 24 25 26 27  18 19 20 21 22 23 24  18 19 20 21 22 23 24  
28 29 30 31           25 26 27 28           25 26 27 28 29 30 31  


       April                  May                   June          
Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa  
 1  2  3  4  5  6  7         1  2  3  4  5                  1  2  
 8  9 10 11 12 13 14   6  7  8  9 10 11 12   3  4  5  6  7  8  9  
15 16 17 18 19 20 21  13 14 15 16 17 18 19  10 11 12 13 14 15 16  
22 23 24 25 26 27 28  20 21 22 23 24 25 26  17 18 19 20 21 22 23  
29 30                 27 28 29 30 31        24 25 26 27 28 29 30  


        July                 August              September        
Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa  
 1  2  3  4  5  6  7            1  2  3  4                     1  
 8  9 10 11 12 13 14   5  6  7  8  9 10 11   2  3  4  5  6  7  8  
15 16 17 18 19 20 21  12 13 14 15 16 17 18   9 10 11 12 13 14 15  
22 23 24 25 26 27 28  19 20 21 22 23 24 25  16 17 18 19 20 21 22  
29 30 31              26 27 28 29 30 31     23 24 25 26 27 28 29  
                                            30                    

      October               November              December        
Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa  
    1  2  3  4  5  6               1  2  3                     1  
 7  8  9 10 11 12 13   4  5  6  7  8  9 10   2  3  4  5  6  7  8  
14 15 16 17 18 19 20  11 12 13 14 15 16 17   9 10 11 12 13 14 15  
21 22 23 24 25 26 27  18 19 20 21 22 23 24  16 17 18 19 20 21 22  
28 29 30 31           25 26 27 28 29 30     23 24 25 26 27 28 29  
                                            30 31         

Unlike the sl command, this one can actually be useful 🙂

Fun with telnet

This one is from lifehacker, and shows a fun little Star Wars scene in ASCII. Unfortunately, I couldn’t find anything for Star Trek, which we all know is better 🙂 . Anyways, to get it, just run:

telnet towel.blinkenlights.nl

I’m pretty sure telnet comes pre-installed, but if not, run:

sudo apt install telnet

Browse the web

If you feel like browsing the web without using a GUI, there’s a simple way to do that: w3m. Simply run:

sudo apt install w3m

and then use

w3m https://www.nerdoflinux.com

or any other site, and you’ll see the website appear in your terminal. You navigate using the arrow keys, and use enter to press links. w3m even supports entering things into forms, so you can technically log in to websites! If you use xterm, you can even get support for images.

List every single file

This is more of a way to annoy someone, but it’s still fun. Simply run:

ls -laR

and watch as every single file on your server is listed. Keep in mind that this will slow down your server, so be ready with ctl+c!! Or, you can also just run the yes command to repeat anything over and over, such as:

yes NerdOfLinux

will print NerdOfLinux forever, until you exit the program.

history -s

The history -s command will add something to your command history. You can abuse this with a simple loop:

x=100
while [ $x -ge 0 ]; do history -s $(openssl rand -hex 8); x=$(expr $x - 1); done

and this will add 100 random strings to the history. This is useful if someone is working on something using the up arrow often, and they leave their terminal logged in 🙂 . Unfortunately, this does not appear to fill up command logs 🙁 .


Leave a Reply(Markdown is On)

%d bloggers like this: