Many friends who have just come into contact with linux VPS are still relatively unfamiliar with linux. In fact, after we get linux VPS, there are many scripts written by talented people to install the environment or panels. You can basically follow the tutorial, but in order to make it more convenient and faster during use, you must remember a few simple commands. The following is a good VPS record of a few commands, just for novices like me. Old bird, please pass by the prawn~
[cd]
The cd command not only displays the current status, but can also change the current status. The cd in Linux is similar to that in DOS.
#cd /home/wwwroot (enter the /home/wwwroot directory)
#cd .. (enter the previous directory)
#cd – (enter the last directory entered)
#cd / (Enter the root directory)
Chengdu
[tar]
The tar command is commonly used in the packaging backup and decompression process when we use VPS.
#tar cvf a.tar.gz *.* (Pack all files in the current directory and compress them into file names a.tar.gz)
#tar cvf a.tar.gz /home (Package the home folder Pack all files under the file and compress them into file names a.tar.gz)
#tar xvf a.tar.gz  (Extract a.tar.gz to the current folder, you can also use zxvf)
# tar tvf a.tar.gz (browse the files in the a.tar.gz compressed package)
[rm]
rm is the deletion command in Linux.
#rm a.tar.gz (Delete a.tar.gz, then confirmation will appear, enter y)
#rm –r (Delete directories one by one to confirm)
#rm –rf (Force deletion, no Confirm)
[ls]
ls is equivalent to dir in the DOS command, listing files in the current directory. (Note: dir can also be used in Linux)
#ls (list directory files)
#ls –l (list files and display detailed information)
#ls -l |more (list directory files) Multi-screen display)
teacher
[mv]
mv is move, but it also has a renaming function.
#mv a.tar.gz /home (move a.tar.gz in the current directory to the home directory)
#mv a.tar.gz b.tar.gz (rename a.tar.gz b.tar.gz)
[cp]
The full name of cp is copy, which naturally means copy.
#cp a.tar.g /home (copy a.tar.gz in the directory to the home directory, you can select multiple times at once, just add the file name after cp)
#cp –R<x2 > (Copy the entire directory, including subdirectories)
[Other commands]
#mkdir (Create directory)
#su  (Switch user)
#pwd ( Display the current directory of the user)
#wget (download from source file)
#ftp (connect to FTP)
#passwd (change password)
#reboot (restart)
#restart (* Also restart, for example: /root/lnmp restart)
 
Postscript: There are many more commands about Linux VPS. My personal level limit makes it impossible to list them all. This article is intended as an introduction, friends, please add to it!


Hong Kong/United States/Domestic High Speed ​​VPS

postid
21679

Leave a Reply