Introduction to the Linux Command Line

1. The prompt at the end of the Linux command line has two different symbols, "#" and "$". The code is as follows:

[root@localhost ~]# ls
anaconda-ks.cfg  Desktop  Documents  mine2  Pictures      post-install.log  python        software   Videos
bin              dev      Downloads  Music  post-install  Public            shell_script  Templates
[root@localhost ~]# su - ghostwu
[ghostwu@localhost ~]$ 

1) The # sign is the end prompt of the command line after logging in with the super user root, and the $ sign is the end prompt of the command line after logging in with the ordinary user.

2) A super user has all the rights to manage the system, while ordinary users have less rights and can only perform basic system information viewing and other operations, but cannot change system configuration and management services.

3) The character in front of the command line prompt @ represents the currently logged in user (which can be queried by whoami), the character behind @ is the hostname (which can be queried by hostname), and the location of ~ is the path where the current user of the window is located.

[ghostwu@localhost ~]$ whoami
ghostwu
[ghostwu@localhost ~]$ hostname
localhost.localdomain
[ghostwu@localhost ~]$ pwd
/home/ghostwu
[ghostwu@localhost ~]$

Second, Linux commonly used shortcut keys 

Another commonly used command man: check the help manual

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325066404&siteId=291194637