17 Fun Linux Commands to Run in the Terminal

The terminal is a very powerful tool, and it’s probably the most interesting part in Unix. Among the plethora of useful commands and scripts you can use, some seem less practical, if not completely useless. Here are some Bash commands that are fun, and some of them are useful as well.

Let’s check them out.

Few people know this, but any Unix system comes with a built-in calendar. To access it, you can simply type:

linux-fun-commands-cal

This will display the current month. However, you can select the precise year, and even the month, that you want as an argument. And to be fully useless, the option -j displays Julian days (the number of days from January 1). To sum up:

This one stands for “Steam Locomotive” and is often typed in error (as it is the opposite of ls). Judging how boring visuals are on the terminal, it is cool to periodically see a locomotive on your terminal, especially when you did not mean for it.

First, install sl with this command typed in your terminal:

Then type the command:

linux-sl-bash-command

A very peculiar command with only one ability: repeating a string until its process is killed. This command displays a string for an infinity until the command is killed. Just type:

For example, yes I did it.

Don’t forget to press Ctrl + C to stop it, or it will run forever.

While it may seems useless, the yes command is very handy when you are running scripts that wait for prompts that you need to automate. For example:

will give a “y” when a prompt asks for a “y/n” answer.

This command is for reversing any input (as its name suggests). When I say reverse, it means that if the input is “Linux,” the output will be “xuniL” It’s pretty strange, I know.

linux-fun-commands-rev

Enter an interactive mode and can quit by using the shortcut Ctrl + C. But rev can also work to reverse an entire file with:

Ever wondered what fire would look like on the black interface of the terminal? This can be achieved with the aafire command.

The first step is to install aafire with the following code on your terminal:

Once it has been installed, on your terminal type:

linux-aafire-bash-command

If you are tired of hearing the everyday voices around you, this command could be your escape. You can listen to your computer talk by installing espeak using this command:

After, run espeak using the command:

Note that whatever you type within the double quotation marks is what your computer will say.

Figlet is a command for those who love to write in ASCII art. It greatly simplifies this task as it automatically transforms any given string. It comes with a bunch of fonts by default at “/usr/share/figlet/fonts/,” and you can of course add your own.

For example:

linux-figlet-bash-command

Similar to figlet, display the text in a big banner format. Install it with the command:

and use the syntax:

linux-fun-commands-banner

This script basically displays a cow character using ascii symbols the arguments passed to it. First, install cowsay with this script:

Then type in the terminal:

Note: replace “yourtext” with whatever text you need to be displayed by the cow.

linux-fun-commands-cowsay

If you prefer a colorful pony to a cow, you can install the ponysay package and its respective command:

linux-fun-commands-ponysay

This command is similar to cowsay, with the only difference being the output is displayed as a thought. To use this command, just type:

For example:

linux-cowthink-bash-command

fortune displays a random sentence in the same spirit as fortune cookies. It is not always installed by default, so you may want to add it. In Ubuntu:

It comes with a very handy option: -s for short, which will limit it to fortunes composed of one sentence or less.

linux-fun-commands-fortune

This command adds some spice to your terminal by adding a cat to your screen which will chase after your (mouse) cursor. Install it by running this script:

Type oneko to display the cat.

linux-fun-commands-oneko

There is a cat command, and “dog” is an alternative to “cat.” (See the humor?) 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, take a look at the manual page.

linux fun commands-dog

If you have seen the Hollywood movie Matrix, then you will relate easily to this command. Install cmatrix using the script:

Run it by typing cmatrix in your terminal.

linux-fun-commands-cmatrix

This is actually two commands time and cat used together. You can use this as a built-in timer. It will run in the background until you stop it and will then report the time elapsed between the start and the end of its process. To launch it, just type:

linux-fun-commands-time-cat

It’s time to do some Math. Let’s do an easy one with the command factor which can break down a given number into prime factors:

linux-fun-commands-factor

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. Therefore, it deserves to be in our list just for that. “w” allows you to see information about current users, like their name, login time, etc.

linux-fun-commands-w

We, of course, know how important commands are, especially in a Linux terminal, but once in a while it is nice to take a break and just amuse yourself with these fun commands.

5 comments

  1. Cowsay and Fortune get installed in *buntus by default and cannot be uninstalled without wrecking the system.

    • It’s sad to see that Linux’s Microsoft’s envy is more evident every passing day in the biggest Linux distributions. Thank goodness we still have other choices.

  2. Read the man page for cal and then look at the following month: September 1752. Notice anything different?

    # cal 9 1752
       September 1752
    Su Mo Tu We Th Fr Sa
           1  2 14 15 16
    17 18 19 20 21 22 23
    24 25 26 27 28 29 30

    Great little trivia item. Thank you Gregorian Reformation.

Leave a Comment

Yeah! You've decided to leave a comment. That's fantastic! Check out our comment policy here. Let's have a personal and meaningful conversation.

Sponsored Stories