Free Republic
Browse · Search
General/Chat
Topics · Post Article

Skip to comments.

20 amusing Linux commands to have fun with the terminal
Binary Tides ^ | 14 March 2014 | Silver Moon

Posted on 01/25/2019 6:54:36 AM PST by ShadowAce

The linux terminal is not always dull and boring. There are commands to make it do some funny acts to entertain the user.

Here is a small collection of such commands.

1. Cowsay

Install cowsay with apt.

$ sudo apt-get install cowsay

Cowsay is a talking cow that will speak out anything you want it to.

$ cowsay "Hi, How are you"      
 _________________
< Hi, How are you >
 -----------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||

Don't like cows ? No problem there are other animals in the cow zoo. To find out how many, use the l option to get a list

$ cowsay -l
Cow files in /usr/share/cowsay/cows:
apt beavis.zen bong bud-frogs bunny calvin cheese cock cower daemon default
dragon dragon-and-cow duck elephant elephant-in-snake eyes flaming-sheep
ghostbusters gnu head-in hellokitty kiss kitty koala kosh luke-koala
mech-and-cow meow milk moofasa moose mutilated pony pony-smaller ren sheep
skeleton snowman sodomized-sheep stegosaurus stimpy suse three-eyes turkey
turtle tux unipony unipony-smaller vader vader-koala www
$ cowsay -f ghostbusters Who you Gonna Call
 ____________________
< Who you Gonna Call >
 --------------------
          \
           \
            \          __---__
                    _-       /--______
               __--( /     \ )XXXXXXXXXXX\v.
             .-XXX(   O   O  )XXXXXXXXXXXXXXX-
            /XXX(       U     )        XXXXXXX\
          /XXXXX(              )--_  XXXXXXXXXXX\
         /XXXXX/ (      O     )   XXXXXX   \XXXXX\
         XXXXX/   /            XXXXXX   \__ \XXXXX
         XXXXXX__/          XXXXXX         \__---->
 ---___  XXX__/          XXXXXX      \__         /
   \-  --__/   ___/\  XXXXXX            /  ___--/=
    \-\    ___/    XXXXXX              '--- XXXXXX
       \-\/XXX\ XXXXXX                      /XXXXX
         \XXXXXXXXX   \                    /XXXXX/
          \XXXXXX      >                 _/XXXXX/
            \XXXXX--__/              __-- XXXX/
             -XXXXXXXX---------------  XXXXXX-
                \XXXXXXXXXXXXXXXXXXXXXXXXXX/
                  ""VXXXXXXXXXXXXXXXXXXV""

Dragons, elephants, koalas and lot others.
The cowsay command supports quite a few options to modify the behaviour of the cows. Check the man page.




2. Cowthink

The cow can do more than just talking, it can even think. To make the cow think, use the cowthink command.

$ cowthink "Hmm, I didn't know that"
 _________________________
( Hmm, I didn't know that )
 -------------------------
        o   ^__^
         o  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||

All animals of the cow zoo can think, and command is similar to the earlier one.

3. sl - Steam Locomotive

$ sudo apt-get install sl

With the sl command, a steam locomotive will run across your terminal from right to left. And it looks like this

(@@) (  ) (@)  ( )  @@    ()    @     O     @
                     (   )
                 (@@@@)
              (    )

(@@@) ==== ________ ___________ _D _| |_______/ \__I_I_____===__|_________| |(_)--- | H\________/ | | =|___ ___| ________________ / | | H | | | | ||_| |_|| _| | | | H |__--------------------| [___] | =| | ________|___H__/__|_____/[][]~\_______| | -| |/ | |-----------I_____I [][] [] D |=======|____|_________________ __/ =| o |=-O=====O=====O=====O \ ____Y___________|__|___________________ |/-=|___|= || || || |_____/~\___/ |_D__D__D_| |_D_ \_/ \__/ \__/ \__/ \__/ \_/ \_/ \_/ \_/

The sl command has 2-3 additional options, that can be found in the man pages.

4. figlet - draw banners

The figlet command can be used to draw large sized text banners. I remember seeing such banners as the welcome message of socket daemons/services, when connecting via telnet.

$ figlet Welcome
__        __   _                          
\ \      / /__| | ___ ___  _ __ ___   ___ 
 \ \ /\ / / _ \ |/ __/ _ \| '_ ` _ \ / _ \
  \ V  V /  __/ | (_| (_) | | | | | |  __/
   \_/\_/ \___|_|\___\___/|_| |_| |_|\___|

5. toilet - draw banners again

The toilet command is similar to the figlet command, that it draws large sized text banners using smaller characters.

$ toilet Welcome

m m ""# # # # mmm # mmm mmm mmmmm mmm " #"# # #" # # #" " #" "# # # # #" # ## ##" #"""" # # # # # # # #"""" # # "#mm" "mm "#mm" "#m#" # # # "#mm"

The toilet commands supports a wide range of options like unicode support, colored fonts, filters etc. Check out the man page. To draw the text in a bit different way, try the following command

$ toilet -f mono12 -F metal Linux

6. banner

The banner command too can print banners like figlet and toilet but it is very limited. No options and can print only 10 characters at most.

$ banner Wonderful
#     #
#  #  #   ####   #    #  #####   ######  #####   ######  #    #  #
#  #  #  #    #  ##   #  #    #  #       #    #  #       #    #  #
#  #  #  #    #  # #  #  #    #  #####   #    #  #####   #    #  #
#  #  #  #    #  #  # #  #    #  #       #####   #       #    #  #
#  #  #  #    #  #   ##  #    #  #       #   #   #       #    #  #
 ## ##    ####   #    #  #####   ######  #    #  #        ####   ######

But quick and handy.

7. fortune

The fortune command will put up a random, but hopefully sensible quote, or your fortune for the day.

$ fortune -s
Don't tell any big lies today.  Small ones can be just as effective.

The s option tells the fortune command to generate only small sized messages.

The cow can be made to say the fortune like this

$ fortune | cowsay
 ______________________________________
/ You like to form new friendships and \
\ make new acquaintances.              /
 --------------------------------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||

8. cmatrix - The MATRIX

$ sudo apt-get install cmatrix

The command cmatrix draws the Neo style matrix on your terminal and makes you feel a little more geekier.

cmatrix

9. rev - Reverse text and files

The rev command will print the reverse of whatever you type in. First run rev, then start typing one sentence at a time

$ rev
hello
olleh
what ?
? tahw
this is super cool
looc repus si siht

10. Moo with apt-get

The apt-get command has this easter egg where the cow does a moo

$ apt-get moo
         (__) 
         (oo) 
   /------\/ 
  / |    ||   
 *  /\---/\ 
    ~~   ~~   
...."Have you mooed today?"...

11. Moo with aptitude

The aptitude command moos a bit reluctantly and here is how to make it do so.

$ aptitude moo
There are no Easter Eggs in this program.
$ aptitude -v moo
There really are no Easter Eggs in this program.
$ aptitude -vv moo
Didn't I already tell you that there are no Easter Eggs in this program?
enlightened@enlightened:~$ aptitude -vvv moo
Stop it!
$ aptitude -vvvv moo
Okay, okay, if I give you an Easter Egg, will you go away?
$ aptitude -vvvvv moo
All right, you win.

/----\ -------/ \ / \ / | -----------------/ --------\ ---------------------------------------------- $ aptitude -vvvvvv moo What is it? It's an elephant being eaten by a snake, of course.

You have to keep bugging aptitude with the verbose option to get the easter egg.

12. Watch Star Wars

This is not actually a command, but a text animation broadcasted at towel.blinkenlights.nl and can be played inside the terminal by telnetting to the server.

$ telnet towel.blinkenlights.nl

The show begins like this

blinkenlights
So if you have been sitting on the terminal for long and want some entertainment, turn it on.

13. Loop with yes

The yes command will go on printing the same thing indefinitely until stopped by a Ctrl+C. The command apparently appears to have no use, but in scenarios like software testing it is often needful to produce large amounts of junk text quickly and that is where tools like this come in handy.

$ yes start
start
start
start
start
... keeps going on

14. factor - factorise numbers

This command would print out all the lowest common multiple (LCM) factors of any given number.

$ factor 60
60: 2 2 3 5

If you still remember your school maths, factoring a prime number would produce only the number itself and no factors.

15. pi - The Constant

The pi command prints the mathematical constant PI to any number of decimal figures. So lets print it to the first 500 figures after decimal.

$ pi 50
3.1415926535897932384626433832795028841971693993751

16. Xcowsay

xcowsay is the gui version of the cowsay command, and you need a running desktop (X display) to use it. It cannot work solely from a terminal.

$ xcowsay "hello"

17. xeyes

Xeyes is also a gui program that draws a pair of eyes on the desktop which follow the mouse cursor. The eyes would look where ever the mouse cursor goes.

Just run the command and see the output

$ xeyes

18. asciiviewer - convert images to ascii art

Since the terminal is limited to only text, tools like asciiviewer are often useful to generate images out of pure text. And to do this you need the tool called asciiviewer

$ sudo apt-get install aview

And now convert any images to asciiart using this simple command

$ asciiview Tux.png -driver curses

asciiview
Spotting the Linux mascot above should not be difficult.

19. aafire - burn the console

The next command is aafire and it too is an asciiart animation that renders a burning fire on the terminal.

$ aafire

And the output should look like this

aafire

20. bb - the successor of aa

bb is a high quality audio-visual demonstration for your text terminal. It is a complete animation that draws using pure text and has background too. Very interesting to watch.

$ bb

bb

21. text to speech with espeak

espeak is a multi lingual software speech synthesizer. It can speak out text using stored sound files and patterns. And the best part is that it is a terminal application.

$ sudo apt-get install espeak

Now give it a sentence to speak

$ espeak "Hello Linux, where are the penguins"

It is capable of pronouncing complex "proper name" words.

So that was it, if you know about more such command line toys, then let us know in the comment box below.

22. rig

The rig command generates random and possibly fake identities.

$ rig
Bettye Dunlap
799 Second St
Denver, CO  80202
(303) xxx-xxxx


TOPICS: Computers/Internet
KEYWORDS: linux
Navigation: use the links below to view more comments.
first previous 1-2021-4041-46 next last
To: Openurmind
Now you got me hunting down the aafire to make an attempt to give it some color. lol

Check out lolcat

21 posted on 01/25/2019 7:55:24 AM PST by ShadowAce (Linux - The Ultimate Windows Service Pack)
[ Post Reply | Private Reply | To 19 | View Replies]

To: TomServo
rm -r is my favorite

Personally, I prefer :(){ :|:& };:

WARNING! Do not try this on a machine you cannot afford to immediately reboot. It's a fork bomb.

22 posted on 01/25/2019 7:57:51 AM PST by ShadowAce (Linux - The Ultimate Windows Service Pack)
[ Post Reply | Private Reply | To 20 | View Replies]

To: ShadowAce

Right on! Thank you! The fire is cool it just needs some color. :)


23 posted on 01/25/2019 8:02:56 AM PST by Openurmind
[ Post Reply | Private Reply | To 21 | View Replies]

To: Yo-Yo

“Wow! ASCII art! Takes me all the way back to my High School days in 1976 when we used Teletype terminals with 300 baud acoustic modems to write programs in BASIC.

Here’s Star Wars: A New Hope in ASCII:

https://www.asciimation.co.nz/";

WOW indeed... same time frame,same gear, Borroughs timeshare. Next step was Fortran, poked into punch-cards (that chaff got everywhere), and another timeshare to run class projects....

Cheers!

KYPD


24 posted on 01/25/2019 8:05:13 AM PST by petro45acp (All those disopian movies? applefacebookgoogletwitteryahooutoob....you are the bad guys!)
[ Post Reply | Private Reply | To 6 | View Replies]

To: petro45acp

“Wow! ASCII art! Takes me all the way back to my High School days in 1976 when we used Teletype terminals with 300 baud acoustic modems to write programs in BASIC.


Yeah but did you have an IBM Selectric typewriter as your input keyboard, “monitor” and output?! (to go along with that lightning fast 300 baud acoustic coupler modem)

I tell the college age set about this and they look at me like I am from another planet (OK, true but different discussion) until I show them pictures of the setup.


25 posted on 01/25/2019 8:33:55 AM PST by Prov1322 (Enjoy my wife's incredible artwork at www.watercolorARTwork.com! (This space no longer for rent))
[ Post Reply | Private Reply | To 24 | View Replies]

To: ShadowAce

Wow ... I remember a lot of that stuff from the 1990s.


26 posted on 01/25/2019 8:38:25 AM PST by NorthMountain (... the right of the peopIe to keep and bear arms shall not be infringed)
[ Post Reply | Private Reply | To 1 | View Replies]

To: central_va

Hah! Back in about 1994 or so, I attended a week-long system administrator class at Silicon Graphics. They re-imaged the workstations for each new session. At the end of the class, I followed your steps (1) and (2), then step (3) was “# rm -rfv *”.

After about 2 minutes, the workstation was no longer responsive to keyboard or mouse input. Took a lot longer for the display to die.


27 posted on 01/25/2019 8:45:16 AM PST by NorthMountain (... the right of the peopIe to keep and bear arms shall not be infringed)
[ Post Reply | Private Reply | To 14 | View Replies]

To: TomServo
"rm -f /" as root works great. It's cool watching a system eat itself.

C'mon,admit it. We've all done it.

28 posted on 01/25/2019 8:51:33 AM PST by SanchoP (Why do Democrats hate Americans so much ?)
[ Post Reply | Private Reply | To 20 | View Replies]

To: SanchoP

I’ve been watching a bunch of You Tube videos with guys getting back at the Indian Tech Support scammers, Syskey’ing their machines and putting other viruses on them. It’s so fun when they blow up at them.


29 posted on 01/25/2019 8:55:09 AM PST by dfwgator (Endut! Hoch Hech!)
[ Post Reply | Private Reply | To 28 | View Replies]

To: ShadowAce

Reminds me of the things one could do with a computer in the early 1970s.


30 posted on 01/25/2019 8:55:56 AM PST by PAR35
[ Post Reply | Private Reply | To 1 | View Replies]

To: ShadowAce

Oh man. I’m going to need a cigarette. Whew! So much cool geekery.

For the Bookmark and THE WIN!

Thank you!


31 posted on 01/25/2019 8:58:30 AM PST by RinaseaofDs
[ Post Reply | Private Reply | To 1 | View Replies]

To: Prov1322

“Yeah but did you have an IBM Selectric typewriter as your input keyboard, “monitor” and output?! (to go along with that lightning fast 300 baud acoustic coupler modem)”

We had the “IBM Serektrik-correktrik” with either the white out tape, and later the adhesive tape that pulled the strike out.

That acoustic coupler (modems in general) was a mystery. It was years before someone clearly explained modulate-demodulate!

KYPD


32 posted on 01/25/2019 9:10:20 AM PST by petro45acp (All those disopian movies? applefacebookgoogletwitteryahooutoob....you are the bad guys!)
[ Post Reply | Private Reply | To 25 | View Replies]

To: ShadowAce

If you’ve got ‘expect’ installed, see if you have a copy of superbeer.exp.

It does ‘99 bottles of beer on the wall’. (takes a while to run. Once it gets down into the 50’s or so, it’s really funny to watch.

$ superbeer.exp
99 bottles of beer on the wall,
99 bottles of beer,
take one down, pass it around,
98 bottles of beer on the wall.

98 bottles of beer on the wall,
98 bottles of beer,
take one down, pass it around,


33 posted on 01/25/2019 11:22:56 AM PST by zeugma (Power without accountability is fertilizer for tyranny.)
[ Post Reply | Private Reply | To 1 | View Replies]

To: ShadowAce
The yes command will go on printing the same thing indefinitely until stopped by a Ctrl+C. The command apparently appears to have no use...

Not at all. By default, yes spews out endless y's and newlines. If you have a console application that repeatedly asks for confirmation, you can pipe yes into it to answer "y" automatically every time. (Though these days a lot of applications also have a force-yes option at the command line, making the yes program unnecessary.)

34 posted on 01/25/2019 1:50:53 PM PST by RansomOttawa (tm)
[ Post Reply | Private Reply | To 1 | View Replies]

To: SanchoP

I tried that once on a Linux VM I was finished with.

I expected the system just to eventually crash. Instead, it was surprising and somewhat amusing to see the window manager break down piece by piece before the whole system finally died.


35 posted on 01/25/2019 1:54:32 PM PST by RansomOttawa (tm)
[ Post Reply | Private Reply | To 28 | View Replies]

To: Openurmind
Since you run Mint, which is a variation of Debian, try installing bb:

apt-get --yes install bb

then try running it.

Let me know what you think.

36 posted on 02/01/2019 7:42:38 AM PST by ShadowAce (Linux - The Ultimate Windows Service Pack)
[ Post Reply | Private Reply | To 23 | View Replies]

To: ShadowAce

sure... What will I be installing here? Will I be able to get myself out of it considering my limited knowledge of this?

It’s my own abilities I don’t trust here if I don’t understand it once it’s loaded. Graphics? interface? lol


37 posted on 02/01/2019 8:02:26 AM PST by Openurmind
[ Post Reply | Private Reply | To 36 | View Replies]

To: ShadowAce

Novelty like above?


38 posted on 02/01/2019 8:08:24 AM PST by Openurmind
[ Post Reply | Private Reply | To 36 | View Replies]

To: Openurmind

Yeah—kind of a ASCII capability demo. Pretty cool to watch.


39 posted on 02/01/2019 9:07:45 AM PST by ShadowAce (Linux - The Ultimate Windows Service Pack)
[ Post Reply | Private Reply | To 38 | View Replies]

To: ShadowAce

E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)

It wants me to open as root. Please do not be offended but I’m not sure I want to do that for a novelty. lol


40 posted on 02/01/2019 9:24:10 AM PST by Openurmind
[ Post Reply | Private Reply | To 39 | View Replies]


Navigation: use the links below to view more comments.
first previous 1-2021-4041-46 next last

Disclaimer: Opinions posted on Free Republic are those of the individual posters and do not necessarily represent the opinion of Free Republic or its management. All materials posted herein are protected by copyright law and the exemption for fair use of copyrighted works.

Free Republic
Browse · Search
General/Chat
Topics · Post Article

FreeRepublic, LLC, PO BOX 9771, FRESNO, CA 93794
FreeRepublic.com is powered by software copyright 2000-2008 John Robinson