CentOS 7 中netstat网络命令不可用

    技术2022-07-11  88

    在系统中使用网络命令客户查看某个端口是否占用,

     netstat -tunlp

       -bash: netstat: command not found

    由于安装的是mini版的系统,有些功能并没有安装进去 ,所以会导致一些CMD命令不可用

    安装网络工具命令 

    yum install net-tools

    root@node1 ~]# netstat -nltp Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1029/sshd tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 1284/master tcp6 0 0 :::22 :::* LISTEN 1029/sshd tcp6 0 0 ::1:25 :::* LISTEN 1284/master

     

    Processed: 0.010, SQL: 9