Linux 网络、Daemon、systemd 相关命令
=== CentOS 7+ 网络、Daemon 相关命令 === 包含了centos system 中 firewalld, port occupation, systemd service management 相关常用命令。 1. firewalld `firewall-cmd --permanent --add-port=100/tcp ` # open specific port `firewall-cmd --permanent --add-port=200-300/tcp` `firewall-cmd --permanent --add-service=http` # open port for service `firewall-cmd --reload` # take changes into effect `firewall-cmd --list-ports` # check the ports opened. `firewall-cmd --list-services` # check the service ` iptables-save` # check all currently applied rules 2. port netstat -tlunp # display all ports opened in host lsof -i # list the network open ports netstat -lptu # the process that owns them netstat -tulpn # You can add " | grep "kw1\|kw2\|kw3' " for keywords grep 3.
…