First, enter the command line interface
Alt + Ctrl +T
User management
- increase user
useradd [options] [username]
There are many options if the default classification can be written directly for example: useradd yonghuming
and he will add a user name for the user name
- Manage user account password
passwd [options] [username]
Here is the only mention that the highest authority of the root account password can be changed
This is an operation carried out is who I view the current user sudo su root is the current user to gain root privileges
passwd + username to modify user password
last enter the password twice (input password input process does not display a few)
passwd [options] [user]
options are -S -d -u the -l
the -l lock user password so that the user can not log in
-u unlock
-s state inquiry password
-d remove the password
4. modify user accounts
usermod + Option + users
usermod -l new user name original user commands
this to modify the user name
usermod -L user name locks the user
option to unlock -U
5. Delete the user account
userdel -r username
This is to remove the user
Management Group Account
- Create a group account
groupadd option group name
Add users to the group's command
addgroup --gid ID group name
- Delete a group account
groupdel group named delete the group
Document Management
Create a file
mkdir directory name options
Delete files
Options rmdir directory name
Change the working directory
cd directory name
Change into the directory
pwd
View the current directory path
ls directory option
-a show all files including. at the beginning
View the contents of a folder
cat Folder Options
File search
find paths content (matching expression)
File deletion
rm options File List
File compression and decompression
gzip compressed file name options
vim editing commands
Key Description
h Left
l Right (lowercase L)
J at
the K
W move to the next word
b to move to the word
command Description
:! Q force-quit without saving
and: q
:! Wq forced to save and exit
: x save and exit
: wq to save and exit
Into normal mode, the following commands can be text quick removal:
Command Description
x delete the character under the cursor
X to remove before the cursor one character
dd delete the entire line
2dd represents delete two lines
input 10x, deleting 10 consecutive characters
input 3DD, the deletes 3 lines of text
in the normal mode using the copy y
normal mode using p paste
u {n} or undo the last n operations
all modifications U (uppercase) revocation of the current row