Article directory
what is shell
There is a kernel (Kernel) at the bottom of the operating system, which is used to realize the basic functions of the computer operating system, such as: disk reading and writing, network connection, keyboard and mouse driver, graphical interface, etc. But users cannot directly manipulate the kernel (Kernel).
At this time, a "Shell" program is needed, and the Shell translates the user's instructions into information that the kernel can understand.
Shell classification
- CLI: Command Line Interface - command line interface
- GUI: Graphical User Interface——graphical interface
Linux Shell
- CLI: BASH
- GUI: GNOME
prompt
- #: Represents logging in as the root user (root)
- $: stands for logging in as a normal user
Commands generally consist of three parts
- Order
- options
- parameter
&symbol
- Adding & after any command means running this command in the background
- Use the jobs command to view jobs running in the background
BASH - History
- Use the up and down keys to view previous commands
- Use the history command to view all history
switch user
-
are -: switch to root user and use a new runtime environment
-
sudo: run the command as an admin user
Display current user information: id
Modify current user password: passwd
uname
uname
只返回Linux
uname -r
返回内核版本号
uname -a
uname --all
返回所有系统信息
cat
The cat command is used to view the contents of a file