ifconfig View native IP
LS View all files and folders in the current directory
Cd/user Open the User folder if you do not know the full name of the folder to open or long, you can press the TAB keyboard Auto-completion, such as: cd/u + Table key, the system automatically help us into the/user
Create a file
mkdir Test Create Folder
Touch Test.txt Create a file
Edit File
VI test.txt Open test.txt file
C Press the C key on the keyboard to switch from the read-only state to the edit state
ESC switches from edit state to read-only state
: Q is exited (when the file has not changed)
: q! Do not save the exit (when the file changes)
: Wq Save and exit
Copying Files
CP test.txt test2.txt Copy the Test.txt file under the current folder to a Test2.txt
CP test.txt/hzh/test Copy the Test.txt to the/hzh/test directory
deleting files
RM aa.txt Delete aa.txt file
rm-r bb Delete the BB directory (including all files under the directory)
Move
MV Dd.txt. Move the Dd.txt file to the top-level directory (note the two points at the tail)
MV bb.txt/hzh/test/Move the Bb.txt file to the hzh/test/directory
Renamed
MV Dd.txt Dd2.txt renamed Dd.txt to Dd2.txt
Find
Locate Aa.txt Check the Aa.txt file in the entire system, locate\slocate the command followed by the file or folder. However, to update the database before executing this command, choose the Execute UpdateDB command.
System commands
DF-LH Viewing disk information
Lsb_release-a viewing all version information of the system
Free View memory Information
PS View the currently running process
Kill-9 QQ.exe Terminate process, 9 means the forced process stops immediately
Shutdown command
Shutdown now immediately shuts down the machine
Shutdown +5 5 minutes after shutdown
Shutdown 23:10 Setting up the system shuts down at 23:10
Shutdown-r now shut down the system and reboot
Linux common Commands ~ Novice must know