The east wind doesn't come
The catkins don't fly in March

VPS Novice Tutorial: Common Linux Commands

1. The tar command is mainly used for packaging and decompression

 #Tar cvf a.tar.gz/home #Tar xvf a.tar.gz (unzip a.tar.gz to the current folder, or zxvf) tar czvf Tar czvf/root/x.tar.gz/home/y/Note: directly package the/home/y/directory and name it x.tar.gz and store it in the/root/x directory. tar xzvf Tar xzvf/root/x.tar.gz/home/y/Note: Extract x.tar.gz from the/root/directory to the/home/y/directory.

2. The mv command is used to move files and folders

 #Mv a.tar.gz/home (move a.tar.gz under the current directory to the home directory) #Mv a.tar.gz b.tar.gz (renamed a.tar.gz to b.tar.gz) Mv/root/x.tar.gz/home/y/Note: Move x.tar.gz from the/root/directory to the/home/y/directory.

3. The rm command deletes files and folders

 #Rm a.tar.gz (delete a.tar.gz, then confirm and enter y) #Rm – r (Confirm the deletion of directories one by one) #Rm – rf (forced deletion, unconfirmed) Rm - rf/root/x.tar.gz Description: Delete the x.tar.gz file in the root directory Rm - rf/root/z/Note: If you delete the z folder of root, all files in the Z folder will be deleted

4. The cd command changes the current directory

 #Cd/home/wwwroot (enter the/home/wwwroot directory) #cd ..  (Enter the upper level directory) #Cd – (enter the last directory) #Cd/(enter the root directory)

Suppose we are now in the/root/directory, cd/home/x/means to switch from the current/root directory to the/home/x/directory

5. wget command download function

 wget   http://www.ppjiazu.com/x.tar.gz Download the x.targz file on the ppjiazu (http) website wget  --no-check-certificate   https://www.ppjiazu.com/x.tar.gz Download the x.targz file on the ppjiazu (https) website

6. ls command to view the current directory file

 #Ls (List Catalog Files) #Ls – l (List files and show details) #Ls - l | more (too many directories for split screen display) Ls/root/x/Description: View the files in the/root/x/directory and list them.

7. Permission granted by chmod command

 Chmod+x/root/unixbench.sh Description: Give unixbench.sh executable permission under root directory Chmod - R 644/root/config.php Note: Give the config.php file 644 permission under the root directory

8. The full name of the cp command is copy, which naturally means copy

 #Cp a.tar.g/home #Cp – R (copy the entire directory, including subdirectories)

9. Other orders

 #Mkdir (create directory) #Su (switching users) #Pwd (display the current directory of the user) #Ftp (Connect FTP) #Passwd #Reboot #Restart (* also restart, for example:/root/lnmp restart)
Like( zero ) Reward
Copyright notice: This article is authorized by the Knowledge Sharing Attribution 4.0 International License Agreement [BY-NC-SA]
Article name: VPS Novice Tutorial: Common Linux Commands
Article link: https://www.wenzika.com/50.html
The resources of this website are only for personal learning and exchange. Please delete them within 24 hours after downloading, and they are not allowed to be used for commercial purposes, otherwise the legal issues will be borne by yourself.

comment Grab the sofa

  • Nickname (required)
  • Email (required)
  • website

Reward the author of the article if you think it is useful

Thank you very much for your reward, we will continue to give more high-quality content, let's create a better online world together!

Scan Alipay and reward

Scan WeChat and reward