Linux understanding and learning bash learning summary

1. Since the kernel is a protected block in memory, we must communicate the commands we enter with the Kernel through "Shell", so that the Kernel can control the hardware to work correctly.

2. The main reasons for learning Shell are: the shell of the command line interface is the same in all major distributions, the command line interface is faster during remote management, and the shell is a very important part of managing the Linux system, because many controls in Linux are based on written by the shell

3. The legal shells of the system are written in the /etc/shells file

4. The shell obtained by the user's default login is recorded in the last field of /etc/passwd

5. The functions of bash mainly include command editing function, command and file completion function, command alias setting function, job control, foreground and background control, programmed script, wildcard

6. type can be used to find out what type of execution command is, or it can be used for the same function as which

7. A variable is to replace some settings or a string of reserved data with a set of words or symbols, etc.

8. Variables mainly include environment variables and custom variables, or global variables and local variables

9. Use env and export to view environment variables, where export can convert custom variables into environment variables,

10. set can view all variables in the current bash environment,

11. $? is also a variable, which is the return code after the execution of the previous command. In linux, the return code is 0, which means the execution is successful.

12, locale can be used to view language data

13. Use read to let the user enter the value of a variable from the keyboard

14. ulimit can be used to limit the use of system resources by users

15. The configuration files of bash are mainly divided into loginshell and non-login shell. Loginshell mainly reads /etc/profile and ~/.bash_profile, while non-login shell only reads ~/.bashrc

16. Wildcards mainly include *,?,[], etc.

17. Data stream redirection converts the output information to other files or devices through symbols such as > 2 > <

18. The execution of continuous commands can be handled by symbols such as ; && ||

19. The point of the pipeline command is that it will only process standard output, and will ignore standard error output. The pipeline command must be able to receive the data from the previous command as standard input to continue processing

20. The pipeline command is mainly learned: cut grep sort wc uniq tee tr col join paste expand split xargs etc.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326829064&siteId=291194637