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
  1. Loaded plugins: fastestmirror



  2. 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
  1. ---> Package lsof.x86_64 0:4.82-4.el6 will be installed



  2. --> Finished Dependency Resolution

  3. Dependencies Resolved

  4. ================================================================================



  5. Package Arch Version Repository Size

  6. ================================================================================

  7. Installing:

  8. lsof x86_64 4.82-4.el6 base 319 k

  9. Transaction Summary

  10. ================================================================================

  11. Install 1 Package(s)

  12. Total download size: 319 k

  13. Installed size: 890 k

  14. Is this ok [y/N]: y

  15. Downloading Packages:

  16. lsof-4.82-4.el6.x86_64.rpm | 319 kB 00:00

  17. Running rpm_check_debug

  18. Running Transaction Test

  19. Transaction Test Succeeded

  20. Running Transaction

  21. Installing : lsof-4.82-4.el6.x86_64 1/1

  22. Verifying : lsof-4.82-4.el6.x86_64 1/1

  23. Installed:

  24. lsof.x86_64 0:4.82-4.el6

  25. Complete!

  26. lsof -i :( port number)

  27.  1. Problem Description

  28.  In centos, can not use the command lsof, the following message appears:

  29.  

  30.  

  31.  2. Solution

  32. We can be installed via yum:

  33.  

  34. |_+_|

  35.  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)