Linux Command Line is fun

Source: Internet
Author: User

Linux Command Line is fun

Have you ever seen a train in the Linux Command Line? What about "cat and mouse? Editing Linux Command lines is not always a serious issue. You can use it to entertain yourself. Next we will discuss with you the characteristics of Linux Command lines.
Assume that all examples in this article use Ubuntu Linux. The command line function may be default in your Linux system.
Interesting Linux Command Line Functions
1. Linux "sl" command line
Although "sl" represents "Steam Engine Head", it is used to remind command line controllers not to convert "ls" into "sl ". Let's see what happens when we run this command in the system.
First, we need to set it to not appear together with standard Linux during installation. You can use "apt-get" to conveniently complete the installation. Most sudo apt-get install sl installation requires the sudo privilege. After installation, enter "sl" in the command prompt line ". $ Sl we see the animation steam engine head moving from the right side of the screen to the left. This locomotive is drawn using ASCLL characters.
Face is on my machine:

Is this more difficult than operating Linux Command lines? I think Linux users immersed in their work will surely smile and realize that their input is incorrect when they see this unexpected animation.
Even this simple command line can provide specific options. Detailed command reference: http://man.cx/sl%286%29SYNOPSIS
Sl [-alFe]

DESCRIPTION
Sl Displays animations aimed to correct users who accidentally enter sl instead of ls. SL stands for Steam Locomotive.

OPTIONS
-A An accident seems to happen. You'll feel pity for people who cry for help.

-L shows little one.

-F It flies.

-E Allow interrupt by Ctrl + C. You can also use $ alia ls = sl to prank people.
2. Linux "yes" command
Here is a command that prints the input string until the process ends. If you do not specify any input string, the default command is "y ".
Run the following command: $ yes mylinuxbook
Mylinuxbook
Mylinuxbook
Mylinuxbook
Mylinuxbook
Mylinuxbook
Mylinuxbook
Mylinuxbook
Mylinuxbook
Mylinuxbook
Mylinuxbook
Mylinuxbook
Mylinuxbook
Mylinuxbook
^ C $ use "ctrl + c" to end the foreground running process.
Strange, right? Why do we want the command to print strings all the time in the process? Although this method is silly, it is not necessarily useless. We can use the "yes" command in a specific script. In these scripts, we can use repeated operations to answer the question. For example, we can operate on a group of files, while Linux requires us to confirm the files. We can use the "yes" command to automatically reply.
3. Linux "rev" command
Although it is very simple, I found this line of command is actually very interesting. It will reverse the input string one by one line. The "rev" command name comes from the English reverse. You can enter "rev" in the Command indicator and press ENTER $ rev later to prompt us to provide a string through standard input. Then we can see the output at the same time after each line.
For example, enter "mylinuxbook" and press Enter. Mylinuxbook
To return to the command prompt, koobxunilym can use "ctrl + c ".
We can see that the inverted string appears in the next line. Then, we can enter the next string that you want to see the reverse effect, and press enter to get the standard output. $ Rev
Google
Elgoog
Linux is fun
Nuf si xunil
^ C $ this line of command can also be input as a file. It will reverse all strings in the file and compress the output result into a standard output. $ Cat strings.txt
MyLinuxBook
Linux is so much fun!
Happy Birthday
$ Rev strings.txt
KooBxuniLyM
! Nuf hcum OS si xuniL
YadhtriB yppaH4. Linux "fortune" command
The Fortune command serves as fortune cookies in the same command line. When we run this command, we randomly find a proverb or message.
First, install it. After $ sudo apt-get install fortune is installed, run the following command: $ fortune
You have the power to influence all with whom you come in contact. Therefore, with this command, Linux can be like a fortune teller.
5. Linux "figlet" command
This command will display the input string in uppercase In the title bar. The display effect consists of ASCII characters.
Because it is not a standard setting, you must first install this function. $ Sudo apt-get install figlet it is really interesting to see the string become so on the terminal. $ Figlet mylinuxbook
You can try to use "figlet" to add a title bar in the script header or source code.
6. Linux "toilet" command
I don't know where the command name comes from. But it is indeed a colorful command. Like figlet, it displays the text as the title bar, but the effect is better.
First, install: $ sudo apt-get install toilet and then try this simple command: $ toilet mylinuxbook. The input result is shown in:

It is more artistic than the figlet command.
However, it can also add colors. Run the following command to see the color: $ toilet-f mono12-F metal mylinuxbook. The effect is as follows:

7. Linux "cowsay" command
The Cowsay command is an interesting command. It depicts cattle, sheep, and many other animals with ASCII characters. But not every Linux release has this command.
Run the following command to install the command: $ sudo apt-get install cowsay now, run the command, and provide an information string in the command. $ Cowsay "Linux is fun" we see an interesting image:

Basically, we will see what a cow tells us. Although only cow is displayed in this command, it can still have the effect of goat. $ Cowsay-f sheep "I too love linux"

You only need to use '-l to see all the animals it provides. Input: $ cowsay-l the system will pop up the following information: Cow files in/usr/share/cowsay/cows:
Apt beavis. zen bong bud-frogs bunny calvin cheese cock cower daemon default
Dragon-and-cow duck 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-smaller ren sheep
Skeleton snowman sodomized-sheep steg1_urus stimpy suse three-eyes turkey
Turtle tux unipony-smaller vader-koala www. Therefore, we can use '-F' to input any animal in the above information.
To make it more interesting, you can make cowsay say fortune information. For example, enter $ fortune | cowsay to show the following effect:

8. Linux "cmatrix" command
This command will generate a matrix-style animation consisting of ASCII characters on the terminal.
First install: $ sudo apt-get install cmatrix. Now run: cmatrix. The effect is cool:

Run "ctrl + c" to generate an animation.
9. Linux "oneko" command
This command is the most fun. We all know the animation of "Cats and mice". This command reminds us of their pursuit of games. With this command, we can see the effect of a cat chasing a mouse (mouse indicator.
First install: $ sudo apt-get install oneko to run this command. We enter oneko, And then you can see that no matter where the mouse indicator is put, Tomcat will chase and run. Below is, but it is not enough to show the dynamic effect:

Even if we switch the application, the cat will not leave the mouse. It is not limited to terminals.

To disable this function, you only need to use ctrl + c in the terminal to end the process.
Conclusion
I hope you can learn more about the interesting Linux Command line functions. If you still know more interesting commands like this, leave a message to share with you!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.