lsofコマンドcentos6を使用できません '-bash:lsof:コマンドが見つかりません'
Can Not Use Lsof Command Centos6 Bash
https://blog.csdn.net/cryhelyxx/article/details/43228423
# lsof -i:3690
-bash: lsof: command not found
# yum install lsof
# yum install lsof
-
Loaded plugins: fastestmirror
-
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: mirrors.163.com
* epel: ftp.cuhk.edu.hk
* extras: mirrors.aliyun.com
* updates: mirrors.163.com
Resolving Dependencies
--> Running transaction check
-
---> Package lsof.x86_64 0:4.82-4.el6 will be installed
-
--> Finished Dependency Resolution
-
Dependencies Resolved
-
================================================================================
-
Package Arch Version Repository Size
-
================================================================================
-
Installing:
-
lsof x86_64 4.82-4.el6 base 319 k
-
Transaction Summary
-
================================================================================
-
Install 1 Package(s)
-
Total download size: 319 k
-
Installed size: 890 k
-
Is this ok [y/N]: y
-
Downloading Packages:
-
lsof-4.82-4.el6.x86_64.rpm | 319 kB 00:00
-
Running rpm_check_debug
-
Running Transaction Test
-
Transaction Test Succeeded
-
Running Transaction
-
Installing : lsof-4.82-4.el6.x86_64 1/1
-
Verifying : lsof-4.82-4.el6.x86_64 1/1
-
Installed:
-
lsof.x86_64 0:4.82-4.el6
-
Complete!
-
lsof -i :( port number)
-
1. Problem Description
-
In centos, can not use the command lsof, the following message appears:
-
-
-
2. Solution
-
We can be installed via yum:
-
-
|_+_|
-
I do the following:
3. lsof several commonly used commands
|_+_|
Such as,
lsof -i: 3306 (3306 is the default port mysql server-side)
lsof -i: 3690 (3690 is the default port svn server-side)