1.更加进程名查看pid: ps -ef |grep name 2.根据进程pid查看其端口号: netstat -anp | grep pid 3.根据端口号查看进程名和端口号: lsof -i:pid