1.ls display directory content
-a display all files in the directory
-l show detailed information
ls *.c list all the current directory.cFile
2.uname -a Check the kernel version
3. whoami Check who is logged in to the virtual machine
4.cd Switch directory
cd.. return to the upper directory
cd / switch to the root directory
< p> cd ./ Switch to the same level (under that file)
cd ~ Switch to the home directory (root)
cd-Switch to the previous directory
cd ./sdy Entersdy
< p> sdy: username
x: password
1000: user id number
1000: groupid
5.pwd display Working Directory
6.touch Change the time of the file Attributes
7.mkdir Create directory
-p If there is no upper level folder, create one level by level
< p>8.rmdir Delete empty directory
< /p>
-p If the directory contains multiple paths, delete them from the last path name in order
9.cp Copy files or directories (the original file still exists)
recursive copy
Forced Copy
10.mv Rename or move files and directories (the original file does not exist)< /span>
11.find Find a file
-name Find by name
-perm Find by permission
12.clear Clear screen screen
13.chmod Change file permissions
u:user g:group o:other a:all
r:Read permissionw:write permissionsx:execution permissions< /span>
+:Add a permission-:Delete a permission=: directly assign a permission /span>
14.Display document content:cat,vi,less,tail(the last few lines),head(display10line)
15.su:Switch user
16.userdel: Delete user
< p>17.usermod:User attribute settings
18.useradd:Add user
1 9.passed:Set a new password
20.Shutdown Shut down the system
21.quotadisk capacity quota
22.reroot restart
ViCommand
(1) dd:(in command mode) delete this line
yy:(in command mode) copy this line Content
pp:(in command mode) Paste the content of this line
(2) h:Shift Leftl:Move rightk:Move upj:Move down
(3) In command mode:
i Edit in front of the cursor
r Edit this location
o down-line editing
a Edit after cursor
(4)last line mode:
! mandatorywSaveq Exit