In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-12 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains the "what are the Linux end-user skills", the content of the article is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "what are the Linux end-user use skills" bar!
Using a Linux terminal is not just about entering commands. By learning these basic skills, you will gradually master Bash shell, the terminal tool used by default on most Linux distributions.
This article is for inexperienced novices, and I'm sure most advanced users already know all of these techniques. But you can still look and maybe learn something you've been ignoring all along.
Automatic completion of Tab key
Using the Tab key to automatically complete is a basic skill. It can save you a lot of time, and it's also useful when you're not sure how to spell a file name or command.
For example, for example, in the current directory you have a file with the name "really long file nam" and you want to delete it. You can enter the entire file name, but you have to be careful of typing the wrong space character (need to be escaped with\). If you type "rm r" and press the Tab key, Bash will automatically complete the name of the file for you.
Of course, if you have many files in the current directory that begin with the letter r, Bash will not 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 complete the "really\" section, because both files begin with this. Then, press the Tab key and you will see a list of all the files that match the beginning, as shown below.
Then enter the file name you want and press Tab. In this way, when we type "l" and 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 command you want, just remember to start with "gnome", type "gnome" and press the Tab key, and you will see all possible results.
Pipe command
The pipe command allows you to transfer the output of one command to another. In Unix's design philosophy, each program has only a few but sophisticated functions. For example, the "ls" command displays a list of all the files in the current directory, while the "grep" command searches for the entered string in the specified place.
By combining the two through the pipe command (represented by the "|" symbol), you can search for a file in the current directory, and the following command is used to search for "really":
Ls | grep really
Wildcard character
The asterisk "*" is a wildcard that matches anything. For example, if we want to delete both "really long file name" and "really very long file name" from the current directory, we can use the following command:
Rm really*name
This command deletes all files that start with really and end with name. If you use the "rm *" command, all files in this directory will be deleted, all should be used with caution.
Output redirection
The ">" character redirects the output of a command to a file without the need for another command. For example, the code in the following figure uses the "ls" command to list all the files in the current directory and inputs the output list into a file called "file1" instead of just displaying the output on the terminal.
Ls > file1
Command line history
Bash will remember the history of the commands you used. You can use the up and down arrow keys to flip through the commands you have already used. Using the "history" command will print out all the historical commands, so you can use the pipe command to search for your most recent commands.
There are many techniques that can be used about command line history
~,. &.
The wavy character "~" represents the home directory of the current user. So, you can use "cd ~" to change to your home directory instead of typing "cd / home/name". This is also used for relative paths, such as "cd ~ / Desktop" to switch to the current user's desktop directory.
Similarly, "." Represents the current directory, ".." Represents the parent directory. All, "cd..." Jumps to the parent directory. This is also valid for relative paths, such as if you are in the Desktop directory, and if you want to change to the Document directory at the same level as the Desktop directory, you can use the "cd.. / Documents" command.
Run commands in the background
By default, Bash will run your commands on the current terminal. Normally there is no problem, but what if you want to run an application at the same time and continue to use the terminal? For example, if you enter the "firefox" command to run Firefox, Firefox will occupy your terminal and display some error messages and other output until you close it. But adding a "&" symbol after the command causes Bash to run the program in the background:
Firefox &
Conditional execution
You can also use Bash to run two commands, one after another. The second command runs only after the first command has been successfully run. To do this, separate the two commands with "&" on the same line.
For example, the "sleep" command takes a parameter in seconds and then countdown to allow it to end. If used alone, this command is of no use, but you can use it as a delay before running the next program. The following command pauses for 5 seconds and then runs gnome's screenshot tool:
Sleep 5 & & gnome-screenshot thank you for your reading, the above is the content of "what are the skills of Linux end users". After the study of this article, I believe you have a deeper understanding of the skills of Linux end users, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.