1. User Login Switch
Login with admin
Su or su-
Admin Switch General user (Guowei)
Su-guowei (user name)
2. Directory switching
3. View the directory in which you are located
PWD (Displays the directory in which it resides)
Cd.. /(Go to previous layer) example: CD. /usr cd/usr
CD/(directly into the system root directory)
CD ~ (Switch to user home directory)
LS (shows all current files)
cd– (returns the key and displays the folder)
4. Operation of the catalogue (increase and deletion check)
Create a folder
mkdir test
mkdir test/xxx
View folders
Ls-a View all folders (with hidden)
Ls-l View folder details (abbreviated LL)
Find a Folder
Find/-name ' folder name '
Find/usr–name ' tes* ' Fuzzy Lookup
Modify folder name
MV Oldfilename Newfilesname
You can also rename files and compressed packages
Cut folder
MV Directory name directory new location
Copy (copy) folder (-R recursive copy, which contains the files inside the copy)
Cp–r/2.txt/usr
Delete file (clip)
Rm–r file (folder) (ask whether to delete)
RM–RF file (clip) (delete directly)
The first day of Linux learning