[Han Shunping Linux] Study Notes 2

1. Quick start to vim

The Linux system will have a built-in vi text editor,
vim, which has the ability to edit programs. It can be regarded as an enhanced version of vi. It can actively use font colors to identify the correctness of grammar, which is convenient for program design.
Command line mode: 输入esc,再输入: 再输入wqmeans write and exit
insert image description here

Two, vim shortcut keys

insert image description here

insert image description here
insert image description here

3. Power on, restart and user login and logout

insert image description here
insert image description here

4. User Management

1. Add user

insert image description here

2. Specify/modify password

insert image description here

3. Delete user

userdel tom #Delete only the user tom
userdel -r tom #Delete the user tom and also delete the home directory of tom

insert image description here

4. Query user information command

insert image description here

5. Switch user

insert image description here

6. View current users

insert image description here

7. User groups

insert image description here
insert image description here
Example:
insert image description here

insert image description here

Five, run level

insert image description here

View the current run level: systemctl get-default

insert image description here

6. Retrieve the root password

Different versions have different ways to retrieve the root password.
The method here is CentOS7.6

insert image description here
insert image description here
insert image description here

insert image description here

7. Help command

insert image description here

Guess you like

Origin blog.csdn.net/weixin_45768644/article/details/128499500