在使用netstat命令是,出现-bash: netstat: 未找到命令,说明网络工具没有安装
[root@192 ~]# netstat -lntup
-bash: netstat: 未找到命令
执行以下命令安装网络工具:
yum:自动化简单化地管理rpm包的命令。
install:安装
net-tools:网络工具
-y:确认执行
[root@192 ~]# yum install net-tools -y
安装完毕,再次执行netstat命令没有问题
[root@192 ~]# netstat -lntup
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:80 0.0.0.0:* LISTEN 2104/nginx: master
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1570/sshd
tcp6 0 0 :::22 :::* LISTEN 1570/sshd
udp 0 0 0.0.0.0:68 0.0.0.0:* 1364/dhclient
udp 0 0 127.0.0.1:323 0.0.0.0:* 1057/chronyd
udp6 0 0 ::1:323 :::* 1057/chronyd