Ubuntu
sudo service 服务 start/stop/status
Firewall
The original Linux firewall was iptables, which was thought to be too cumbersome, and almost every distribution has its own solution;
ubuntu firewall ufw (ubuntu firewalld)
centos firewall (firewalld)
sodu service ufw start
sodu service ufw stop
sodu service ufw status
CentOS
sudo systemctl 服务 start
sudo systemctl 服务 stop
sudo systemctl 服务 status
sudo systemctl firewalld start
sudo systemctl firewalld stop
sudo systemctl firewalld status