15 interesting linux shell commands

Today, I will introduce some interesting linux shell commands. All commands can use man + command name to see the complete usage.

1. figlet character drawing

figlet can output English strings in the form of character drawing:

>>> figlet hello
 _          _ _       
| |__   ___| | | ___  
| '_ \ / _ \ | |/ _ \ 
| | | |  __/ | | (_) |
|_| |_|\___|_|_|\___/

2. toilet character painting

The function of toilet is similar to that of figlet, but the output characters are drawn differently. The command can also set font and color.

>>> toilet hi
              
 #        "   
 # mm   mmm   
 #"  #    #   
 #   #    #   
 #   #  mm#mm  

3. lolcat character painting and color

The lolcat command can color the output of figlet or toilet:

toilet hello| lolcat

The output is as follows:

4. aafire

The aafire command outputs flame like characters composed of ASCII code, and the screen burns up:

>>> aafire

5. fortune random sentences

fortune command randomly outputs famous sayings or jokes:

>>> fortune
Soap and education are not as sudden as a massacre, but they are more
deadly in the long run.
		-- Mark Twain

The fortune zh command only outputs Chinese:

>>> fortune-zh
 The general trend of the world is to divide for a long time and divide for a long time.

6, yes repeat a sentence

The yes command repeats a sentence:

>>> yes hello,world
hello,world
hello,world
hello,world

7. pi Pi

pi command outputs pi. pi number indicates how many bits of pi are output:

>>> pi 20
3.1415926535897932384

8. cal calendar

The cal command displays the calendar:

>>> cal
--------------------
     April 2020       
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

9, sl small train

sl command output a small train:

ls-h (no space in the middle) can see an endless train:

10. cowsay can talk

The cowsay command is a talk cow, which can output many kinds of animals.

>>>Cowsay "I'm a little cute ~"

< I'm a little cute ~ >
 -----------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||

Cowsay-l can output all supported small animals:

>>> cowsay -l

Cow files in /usr/share/cowsay/cows:
apt bud-frogs bunny calvin cheese cock cower daemon default dragon
dragon-and-cow duck elephant elephant-in-snake eyes flaming-sheep
ghostbusters gnu hellokitty kiss koala kosh luke-koala mech-and-cow milk
moofasa moose pony pony-smaller ren sheep skeleton snowman stegosaurus
stimpy suse three-eyes turkey turtle tux unipony unipony-smaller vader
vader-koala www

Use the - f parameter to switch small animals:

>>>Cowsay - f duck
 ________________
< I'm a duck >
 ----------------
 \
  \
   \ >()_
      (__)__ _

The x cowsay command is graphical.

11. cmatrix matrix

cmatrix command can show the effect of hacker empire:

cmatrix also has many parameters to change the effect:

parameter Meaning
-a Asynchronous rolling
-b Turn on bold characters
-B All characters are bold
-o Use old scroll mode
-C Switch colors

12. ASCII Aquarium

ASCII aquarium is an aquarium, I'm sure it will amaze you. The installation method is as follows:

$ sudo apt-get install libcurses-perl
$ cd /tmp
$ wget --no-check-certificate http://search.cpan.org/CPAN/authors/id/K/KB/KBAUCOM/Term-Animation-2.4.tar.gz
$ tar -zxvf Term-Animation-2.4.tar.gz
$ cd Term-Animation-2.4/
$ perl Makefile.PL && make && make test
$ sudo make install

$ cd /tmp
$ wget --no-check-certificate http://www.robobunny.com/projects/asciiquarium/asciiquarium.tar.gz
$ tar -zxvf asciiquarium.tar.gz
$ cd asciiquarium_1.0/          # whatever the current version you got was
$ sudo cp asciiquarium /usr/local/bin
$ sudo chmod 0755 /usr/local/bin/asciiquarium

After the installation is successful, execute the asciquarium command:

13. ASCII view picture conversion character painting

The ASCII view command can convert any picture to character picture for output. The installation method is as follows:

sudo apt-get install aview imagemagick

asciiview hepburn.pen

Convert a picture of Hepburn, the effect is as follows:

14, bastet Tetris

This is a Tetris in the command line. You can use the direction key to control:

15, ninvaders Space Invaders

This is a space intruder game. Press the direction key to move, and the space can fire bullets:

There are many command-line games like this. We will not show them one by one here. You can try them yourself if you are interested:

command Meaning
pacman4console Pac Man
nsnake Snake
greed Winner takes all
bsdgames Air tower control
bsdgames backgammon
moonbuggy Lunar rover
2048 Command line version 2048

(end.)

Tags: Operation & Maintenance ascii sudo Linux shell

Posted on Fri, 17 Apr 2020 18:59:07 -0700 by Pascal P.