lsof命令无效

lsof命令无效1.问题描述在centos下,无法使用命令lsof,出现以下信息:[plain] viewplain copy# lsof -i:3690  -bash: lsof: command not found  2.解决方法我们可以通过yum来安装:[plain] viewplain copy# yum install lsof  本人操作如下:[plain] viewplain copy

大家好,又见面了,我是你们的朋友全栈君。如果您正在找激活码,请点击查看最新教程,关注关注公众号 “全栈程序员社区” 获取激活教程,可能之前旧版本教程已经失效.最新Idea2022.1教程亲测有效,一键激活。

Jetbrains全家桶1年46,售后保障稳定

1. 问题描述
在centos下, 无法使用命令lsof, 出现以下信息:

Jetbrains全家桶1年46,售后保障稳定


[plain] 
view plain
 copy

  1. # lsof -i:3690  
  2. -bash: lsof: command not found  
2. 解决方法
我们可以通过yum来安装:

[plain] 
view plain
 copy

  1. # yum install lsof  
本人操作如下:

[plain] 
view plain
 copy

  1. # yum install lsof  
  2. Loaded plugins: fastestmirror  
  3. Setting up Install Process  
  4. Loading mirror speeds from cached hostfile  
  5.  * base: mirrors.163.com  
  6.  * epel: ftp.cuhk.edu.hk  
  7.  * extras: mirrors.aliyun.com  
  8.  * updates: mirrors.163.com  
  9. Resolving Dependencies  
  10. –> Running transaction check  
  11. —> Package lsof.x86_64 0:4.82-4.el6 will be installed  
  12. –> Finished Dependency Resolution  
  13.   
  14. Dependencies Resolved  
  15.   
  16. ================================================================================  
  17.  Package         Arch              Version                Repository       Size  
  18. ================================================================================  
  19. Installing:  
  20.  lsof            x86_64            4.82-4.el6             base            319 k  
  21.   
  22. Transaction Summary  
  23. ================================================================================  
  24. Install       1 Package(s)  
  25.   
  26. Total download size: 319 k  
  27. Installed size: 890 k  
  28. Is this ok [y/N]: y  
  29. Downloading Packages:  
  30. lsof-4.82-4.el6.x86_64.rpm                               | 319 kB     00:00       
  31. Running rpm_check_debug  
  32. Running Transaction Test  
  33. Transaction Test Succeeded  
  34. Running Transaction  
  35.   Installing : lsof-4.82-4.el6.x86_64                                       1/1   
  36.   Verifying  : lsof-4.82-4.el6.x86_64                                       1/1   
  37.   
  38. Installed:  
  39.   lsof.x86_64 0:4.82-4.el6                                                        
  40.   
  41. Complete!  
3. lsof 的常用几个命令

[plain] 
view plain
 copy

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

 

 
 
OK, Enjoy it!!!
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/234317.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号