centos7中systemctl 对系统服务的控制

启动服务bash

systemctl start iptables.service

中止服务ide

systemctl stop iptables.service

重启服务rest

systemctl restart iptables.service

查看服务状态ip

systemctl status iptables.service

开机启动it

systemctl enable iptables.service

禁止开机启动table

systemctl disable iptables.service

查看全部已启动的服务class

systemctl list-units --type=service

查看开机启动服务列表file

systemctl list-unit-files

查看某个服务开机是否启动iptables

systemctl list-unit-files |grep iptables
iptables.service                       enabled
相关文章
相关标签/搜索