linux 查看端口
step1 查进程号
syntax :
netstat -apn|grep [port number]
e.g.
netstat -apn|grep 8888
explain
-a, --all, --listening display all sockets (default: connected) -p, --programs display PID/Program name for sockets -n, --numeric don't resolve names
step2 查进程
syntax:
ps -ef|grep [pid]
e.g.
ps -ef|grep 28565
explain:
-e all processes -f full