Essential skills for Linux end users

  
                

As a beginner of Linux terminal, there is a lot of knowledge to learn. In addition to the basic commands, you need to master some tips. The following small series will introduce you to the necessary tips for beginners of Linux terminals. It is helpful to you.

Using a Linux terminal is more than just entering commands. After learning these basic techniques, you will gradually master the Bash shell, the terminal tool that is used by default on most Linux distributions.

This article is written for inexperienced novices, and I believe that most advanced users already know all of these techniques. However, you can still look at it and maybe learn something you have always overlooked.

Tab key auto-completion

Auto-completion using the Tab key is a basic technique. It saves you a lot of time, and it's useful when you're not sure how a file name or command is spelled.

For example, if you have a file in the current directory, the file name is "really long file nam", you want to delete this file. You can enter the entire file name, but you have to be careful to enter the wrong space character (requires \\escape). If you type ”rm r” and press the Tab key, Bash will automatically complete the file name for you.

Of course, if you have a lot of files starting with the letter r in the current directory, Bash won't know which one you are referring to. For example, in the current directory, you have another text called “Really very long file name”. When you press the Tab key, Bash will be added to the “really\\” section because both files start with this. . Then, press the Tab key and you will see a list of all files that match the beginning, as shown below.

Then enter the file name you want and press the Tab key. In this way, when we lose “l” then press the Tab key, Bash will automatically complete the file name we want.

This method is also suitable for entering commands. When you are not sure what the command you want is, just remember to start with ”gnome”, enter “gnome” then press the Tab key and you will see all possible results.

The Pipeline command allows you to transfer the output of one command to another. In the Unix design philosophy, each program has only a few features. For example, the “ls” command will display a list of all files in the current directory, and the ”grep” command will search for the input string in the place where it was created.

Pass the two through the pipeline command (with “

Copyright © Windows knowledge All Rights Reserved