centos6下无法使用lsof命令”-bash: lsof: command not found”

centos6下无法使用lsof命令"-bash: lsof: command not found"

问题描述

在centos下, 无法使用命令lsof, 出现以下信息:

[root@yunwei ~]# lsof -i :3306
-bash: lsof: command not found

通过yum安装lsof

[root@yunwei ~]# yum install lsof

//输入上述命令,等待,即可完成lsof的安装,

lsof 的常用命令

lsof -i:(端口号)
lsof -i:3306 (3306默认是mysql服务端的端口)
lsof -i:3690 (3690默认是svn服务端的端口)

[root@yunwei ~]# lsof -i :3306

//3306默认是mysql的端口号



[root@yunwei ~]# lsof -i :3690

//3690默认是svn服务端的端口号