进程与端口
端口
查看端口
$ netstat -antlp | more
查看pid
对应的进程文件路径:
$ ls -l /proc/$PID/exe
# 或
$ file /proc/$PID/exe
查看连接
$ netstat -antlp | grep ESTABLISHED
$ netstat -antlp | grep LISTEN
进程
查看进程
$ ps aux | grep $PID | grep -v grep
隐藏进程查看
$ ps -ef | awk '{print}' | sort -n | uniq >1
$ ls /proc | sort -n |uniq >2
$ diff 1 2
查看相关文件和路径
$ lsof -p [PID]
$ pwdx [PID]
Last updated
Was this helpful?