mkdir xxx Create a folder named XXX
LS View list of file names in the same directory
ll see the details of the list of files in your directory
CD XXX To switch directories to a directory with the file name xxx
PWD Displays the current directory
Cd.. Back to the previous level of the current directory
RM-RF xxx Delete folder named xxx
VI a.js or VIM a.js new file, also use this command to view the content. Press ENTER after you click I can edit the content Esc exit Edit state Save and exit click ESC and enter: w for Save, enter : Q for exit input : Wq for Save and exit
Cat xxx View xxx file contents
Head xxx View xxx file header content head-n 1 xxx You can specify the number of rows to display after the number of-N is displayed
tail xxx view xxx file trailer content tail-n 2 XXX You can specify the number of rows to display after the number of-N is displayed
grep '2' xxx search xxx file contains 2 content
CP a.txt a1.txt Copy the A.txt file to the current directory and named A1.txt
MV A.txt src/a1.txt Move the a.txt file to the SRC directory and named A1.txt
RM xxx Delete xxx files, this deletion is not recycle Bin so delete need to be cautious
Login action
SSH [email protected] SSH mode login, enter--input password
Linux basic commands