零食网站建设的策划书,网站建设能给客户带来什么,沛县徐州网站开发,二次开发机器人今天想查看防火墙的状态#xff0c;但是对防火墙的操作还不熟悉#xff0c;网上搜到的命令是这样的systemctl status firewalld 结果输入之后出现了这样的错误#xff1a; System has not been booted with systemd as init system (PID 1). Can’t operate. 然后接着去网上…今天想查看防火墙的状态但是对防火墙的操作还不熟悉网上搜到的命令是这样的systemctl status firewalld 结果输入之后出现了这样的错误 System has not been booted with systemd as init system (PID 1). Can’t operate. 然后接着去网上搜索解决错误的原因 有博客上是systemctl没用安装但是我尝试sudo apt install systemctl安装之后又报出了新的错误 E: Unable to locate package systemctl 该错误的解决方法可参照 E: Unable to locate package systemctl的解决 但是折腾了半天还是没能解决说明可能不是没有安装systemctl的缘故。 最后我了解到如果在Windows里面用WSL使用Ubuntu那么系统就会有SysV而不是systemd当运行systemctl命令时你的系统就会出现上述的提示。 因此我们对于防火墙的操作不用systemctl。 正确的查看防火墙状态的命令可以是
service firewall status同理打开为
service firewall start重启为
service firewall restart关闭为
service firewall stop成功