一、
lsof -i 用以显示符合条件的进程情况,lsof(list open files)是一个列出当前系统打开文件的工具。以root用户来执行lsof -i命令
lsof -i:端口号 用于查看某一端口的占用情况
二、
netstat -tunlp用于显示tcp,udp的端口和进程等相关情况,
netstat -tunlp|grep 端口号
一、
lsof -i 用以显示符合条件的进程情况,lsof(list open files)是一个列出当前系统打开文件的工具。以root用户来执行lsof -i命令
lsof -i:端口号 用于查看某一端口的占用情况
二、
netstat -tunlp用于显示tcp,udp的端口和进程等相关情况,
netstat -tunlp|grep 端口号