10 More Funny and/or Useless Linux Commands

Not so long ago, in a very, very close galaxy, I gave a top ten of the most funny and/or useless Linux commands — a collection of various (in)utilities that a lot of you commented on, proposing some additional commands, or explaining their function. Some of these comments were in fact very interesting and I think that the list should be updated, taking them into account. I therefore present another top ten list of the most funny and/or useless commands, including your opinions and just a little bit of mine, so that we have a list that goes to ten. Watch out though, because some of the commands listed here will not work by default and may require the installation of an extra package.

Thanks to Asdasd, I discovered “sl”. An incredibly useless but very necessary program that just shows a train in ASCII art going through your terminal. Maybe one of the most appealing commands of this top ten.

10_more_funny_commands-sl

Credit goes to cameronhorsburgh for bringing this one up. “pi” displays an approximation of PI, useful if you are making some calculation, I guess. The syntax is:

pi [number of digits to display]

10_more_funny_commands-pi

Coats was the one to bring this one up. “dog” is an alternative to “cat” (see the humor?), as it uses the same syntax to display a text stream into the console. You will probably have to install it as it is not a command offered by default, but when you do, I invite you to take a look at the manual page.

10_more_funny_commands-dog

“vdir” is useless in that it is a redundancy. Its main function is to list the content of a directory, displaying the name of the files, the permissions, the dates of modification, the sizes, etc. However, all of this can be done via the good old command “ls” and its composite like

ls -l

10_more_funny_commands-vdir

“clear” is also a redundancy. With this command, you will erase the lines from the terminal and “clear the screen.” But anyone adept with the console will save time by using the shortcut “Ctrl+l”, which does exactly the same thing.

10_more_funny_commands-clear

An interesting command, “ul” can be used to underline characters in the terminal. I still have not figured it out completely but I know that, for example, it will transform

echo $'hello w\b_o\b_r\b_l\b_d\b_ ' | ul

into “hello world“. As you can guess, it replaces the meta-character “\b_” with an actual underlining.

10_more_funny_commands-ul

You can say whatever you want about “w”, but it is to my knowledge the shortest command you can find by default on your machine. And I think that it therefore deserves to be in our list just for that. Surprisingly, “w” allows you to see information about the current users, like their name, their login time, etc.

10_more_funny_commands-w

A moore’s contribution: filters is a set of tools that transforms text to give it some phonetic accent. “man talkfilters” will give you the list of the possible accents. But as an example,

echo "make tech easier is cool" | fudd

will give “make tech easiew is coow ” which supposedly imitates Elmer Fudd’s accent (the guy who hunts Bugs Bunny in Looney Tunes). And one of my favorites, the filter “warez” will give you your input in H4x0r code. The previous example becomes “]\/[ak3 73k]-[ 3az13r YZ c0ol” with “warez” instead of “fudd” at the end of the command.

10_more_funny_commands-filters

Last time, I presented to you the famous fortune command which gives you a (relatively) short and random geek sentence each time you call it. However, if you can add your own fortunes to the database, it is also possible to download extensions, or mods, which add fortunes from a specific source, like Star Wars, the Chuck Norris facts, different languages, Matrix, Futurama, Calvin and Hobbes, and more. Install the mod that you want and do

fortune [name of the mod]

As an example, I installed the Chuck Norris fact extension in English, so by doing

fortune chucknorris

I get “Chuck Norris grinds his coffee with his teeth and boils the water with his own rage.”

10_more_funny_commands-fortune_mod

Finally, a little script to end the top ten. I could not stop myself from sharing the snow.sh script from myh3r3.com which creates little snowflakes falling into your terminal. Copy-paste the code into a text file, name it “snow.sh”, make it executable, and launch it in a terminal to admire.

#!/bin/bash
 
LINES=$(tput lines)
COLUMNS=$(tput cols)
 
declare -A snowflakes
declare -A lastflakes
 
clear
 
function move_flake() {
i="$1"
 
if [ "${snowflakes[$i]}" = "" ] || [ "${snowflakes[$i]}" = "$LINES" ]; then
snowflakes[$i]=0
else
if [ "${lastflakes[$i]}" != "" ]; then
printf "\033[%s;%sH \033[1;1H " ${lastflakes[$i]} $i
fi
fi
 
printf "\033[%s;%sH*\033[1;1H" ${snowflakes[$i]} $i
 
lastflakes[$i]=${snowflakes[$i]}
snowflakes[$i]=$((${snowflakes[$i]}+1))
}
 
while :
do
i=$(($RANDOM % $COLUMNS))
 
move_flake $i
 
for x in "${!lastflakes[@]}"
do
move_flake "$x"
done
 
sleep 0.1
done

10_more_funny_commands-snow

First, I want to thank you all for your comments on the previous article. I tried to put here a synthesized version of what you reported in order to share it with more people. Of course, this list is still not complete, and even if I personally doubt that it will ever be, I still invite you to continue to share.

So again, if you can think of more, or if you have an example in mind of when these commands become handy, please leave us a comment.

Do you like what you read here?

Receive the latest update in your inbox.

Or connect with us: