Tangwx

Tangwx

博客网站

Linux Commands

Linux Commands#

1 SCP Command#

scp -r username@targetip:targetpath destinationpath

scp -r [email protected]:/opt/hermes/5/SentimentModel.py .

2 ps Command#

ps -ef to view processes

Filter processes, check if a process exists with ps -ef | grep targetprocess

Example: ps -ef | grep EmailTools.py

grep -v to exclude matches

awk

3 kill Command#

kill -9 processid

Kill a process

4 su Command#

su username

[test@iZuf64fh3qqfih9qs3bh1oZ tang]$ su hermes
Password: 

!@#$&*()

5 echo#

View environment variables

[hermes@iZuf64fh3qqfih9qs3bh1oZ EmailTools]$ echo $LANG en_US.UTF-8

6 telnet Test if a server port is accessible#

telnet ip

Local ip 0.0.0.0 telnet 0.0.0.0 portnumber

Exit: Enter Ctrl+] to enter telnet>

Then enter quit

telnet> quit
Connection closed.

7 top View processes and resource usage#

8 View users#

who

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.