在想使用netstat -lap | fgrep port命令时提示
[root@localhost ~]# netstat -lap |fgrep 22-bash: netstat: command not found
这是因为此时还没有这个命令,如果直接yum install netstat的话是找不到这个包的,需要执行
yum install net-tools -y
安装好之后就可以使用这个命令了。
[root@localhost ~]# netstat -lap |fgrep 80unix 2[ ACC ]STREAMLISTENING22580 1545/masterprivate/deferunix 3[ ] DGRAM13955 380/systemd-udevd unix 3[ ] DGRAM13956 380/systemd-udevd unix 2[ ] DGRAM13937 380/systemd-udevd unix 3[ ] STREAMCONNECTED13929 380/systemd-udevd unix 3[ ] STREAMCONNECTED22780 887/dbus-daemon/run/dbus/system_bus_socket