etstat -anp |grep 端口号

root用户执行

netstat -ntupl

n表示不查询dns

t表示tcp协议

u表示udp协议

p表示查询占用的程序

l表示查询正在监听的程序

查看那个进程占用了xxx端口
lsof -i:xxx
查看进程号为xxx的进程在哪里
ps -ef|grep xxx
ps -ef |grep  程序名
netstat -nltp |grep 端口号或服务名

相关文章:

  • 2021-12-06
  • 2021-12-06
  • 2021-12-06
猜你喜欢
  • 2021-12-06
  • 2021-07-18
  • 2021-12-06
  • 2021-04-06
  • 2022-01-26
  • 2022-12-23
相关资源
相似解决方案