centos7查看开机启动 关闭开机服务 防火墙

查看开启服务:

[root@localhost conf.d]# systemctl list-unit-files |grep enabled
auditd.service                                enabled 
[email protected]                               enabled 
crond.service                                 enabled 

查看要关闭的防火墙服务

[root@localhost conf.d]# systemctl list-unit-files |grep firewalld
firewalld.service                             disabled

disabled 是关闭,如果开启,请关闭

systemctl disable firewalld

防火墙开关机

启动: systemctl start firewalld
关闭: systemctl stop firewalld
查看状态: systemctl status firewalld 
开机禁用  : systemctl disable firewalld
开机启用  : systemctl enable firewalld

猜你喜欢

转载自blog.51cto.com/weiruoyu/2453185