SUSE Linux 15 If ‘netstat‘ is not a typo you can use command-not-found to lookup the package...

SUSE Linux 15 netstat命令不支持

suse15-sp3:~ # netstat -anp
If 'netstat' is not a typo you can use command-not-found to lookup the package that contains it, like this:
    cnf netstat
suse15-sp3:~ # 

但在SUSE Linux12时是支持netstat

suse-12-sp5:/ # cat /etc/os-release 
NAME="SLES"
VERSION="12-SP5"
VERSION_ID="12.5"
PRETTY_NAME="SUSE Linux Enterprise Server 12 SP5"
ID="sles"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:suse:sles:12:sp5"
suse-12-sp5:/ # netstat -anp
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name   
tcp        0      0 127.0.0.1:59681         0.0.0.0:*               LISTEN      2741/KvEdrSvc       
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1736/sshd           
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      2161/master         
tcp        0      0 127.0.0.1:6010          0.0.0.0:*               LISTEN      2332/0      

1、检查是否安装net-tools,已安装,但问题未解决

2、度娘,部分也是安装网络工具,也有说后续版本不再支持netstat工具

解决:

SUSE Linux 15不支持netstat,支持命令ss

如下:

suse15-sp3:~ # ss -anp|grep :22
tcp                LISTEN              0                    128                                                                                 users:(("sshd",pid=1382,fd=3))                                                 
tcp                ESTAB               0                    36                                                                                  users:(("sshd",pid=2660,fd=4))                                                 
tcp                LISTEN              0                    128                                                                                 users:(("sshd",pid=1382,fd=4))                                                 
suse15-sp3:~ # ss -anp|grep KvEdr|wc -l
15
suse15-sp3:~ # 

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值