In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)05/31 Report--
In this article, the editor introduces in detail "what are the common commands in SSH under Linux VPS", which are detailed, the steps are clear, and the details are handled properly. I hope that this article "what are the common commands in SSH under Linux VPS" can help you solve your doubts.
Directory operation:
Rm-rf mydir / * Delete the mydir directory * /
Cd mydir / * enter the mydir directory * /
Cd-/ * go back to the previous directory * /
Cd.. / * go back to the parent directory with a space in the middle * /
Cd ~ / * back to the root directory * /
Mv tools tool / * rename the tools directory to tool * /
Ln-s tool bac / * create a symbolic link called bac for the tool directory. You should be most familiar with the link from www to the public_html directory in ftp * /
Cp-a tool / home/vpser/www / * copy all files from the tool directory to the www directory * /
File operation:
Rm go.tar / * Delete go.tar file * /
Find mt.cgi / * find the file named mt.cgi * /
Df-h / * check the remaining space on the disk, it doesn't seem necessary, unless you are too much * /
Unzip:
Tar xvf wordpress.tar / * decompress the file in tar format * /
Tar-tvf myfile.tar / * View the files contained in the tar file * /
Tar cf toole.tar tool / * package the tool directory as a toole.tar file * /
Tar cfz vpser.tar.gz tool / * packages the tool directory and compresses it into a vpser.tar.gz file, because the .tar file is almost uncompressed, and the .tar.gz file of mt is almost 10mb * / when decompressed into a .tar file.
Tar jcvf / var/bak/www.tar.bz2 / var/www/ / * create .tar.bz2 file with high compression ratio * /
Tar xjf www.tar.bz2 / * decompress tar.bz2 format * /
Gzip-d ge.tar.gz / * decompress the .tar.gz file into a .tar file * /
Unzip phpbb.zip / * decompress the zip file. It is a bit troublesome to compress a .tar.gz file under windows * /
Download:
Wget http://soft.vpser.net/web/nginx/nginx-0.8.0.tar.gz
/ * download files from a remote server to your own server without even uploading. The server has either 100m or 1000m bandwidth, and it takes dozens of seconds to download a 2-3MB mt * /
Wget-c http://soft.vpser.net/web/nginx/nginx-0.8.0.tar.gz
Process management:
Ps-aux / * ps process status query command * /
The meaning of the output field of the ps command:
[list]
[*] user, user name of the process owner.
[*] pid, process number, which can uniquely identify the process.
[*]% cpu, the percentage of cpu time and total time spent by the process since it was last refreshed.
[*]% mem, the percentage of memory used by the process.
[*] vsz, the amount of virtual memory used by the process, in k.
[*] rss, the total amount of physical memory occupied by the process, in k.
[*] tty, the terminal name associated with the process.
[*] stat, process status, using (rmurf-run or ready to run; smurf-sleep state; iMub-idle; zmuri-freeze; dmurt-uninterrupted sleep; w-process does not reside page; t stop or trace.) These letters denote.
[*] start, the time when the process starts running.
[*] time, the total cpu time used by the process.
[*] command, the command line being executed.
[/ list]
Ps-aux | grep nginx / * of all processes, find the process of nginx * /
Kill 1234 / * 1234 is the process id, that is, pid*/ in ps-aux
Killall nginx / * killall kills all processes directly through the name of the program, and nginx is the process name * /
Vim operation:
Mobile:
H/j/k/l: move left / bottom / up / right by one frame
W: move backward words (how many words are preceded by numbers)
B: move to the preword (how many words are preceded by a number)
E: move back to the end of the word
Ge: move forward to the end of the word
$: end of line
0: beginning of Lin
Tx: look to the right for the x of this line and move there (left in uppercase)
33g: move to line 33 of the file
Gg: first line of the file
G: tail line of file
33%: 33% of the document
H/m/l: the first / middle / last line of the screen
Zt/zz/zb: the current line moves to the top / middle / bottom of the screen
Jump:
": go back to the place where you jumped
Ctrl-o: jump to an "older" place
Ctrl-i: jump to a "newer" place
Find:
/: look down (add keywords)
?: look up (followed by keywords)
N: the next matching record
Edit:
I: switch to insert mode
X: delete the current character
. Repeat the last modification operation (filter with ctrl+f in ps)
U: undo operation
Ctrl-r: redo
P: inserts deleted characters into the current position (put)
Exit Save:
: Q: exit
: Q!: do not save exit
Zz: exit after saving
: e!: discard changes and edit again
After reading this, the article "what are the common SSH commands under Linux VPS" has been introduced. If you want to master the knowledge points of this article, you still need to practice and use it yourself. If you want to know more about related articles, welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.