systemctl命令

systemctl命令是centos7新的命令!!他的前身是chkconfig命令!!相对于chkconfig命令来说,他的功能更加的丰富!!

chkconfig  --list      与systemctl   list-unit-files功能一样!!

###################################################################################################################

下面开始正式讲systemctl命令,这里我就以一个firewalld的服务作为解释!!

systemctl  start  firewalld                              启动服务
systemctl  stop  firewalld                               关闭服务
systemctl  status  firewalld                            查看状态 
systemctl  enable   firewalld                          开机自启动
systemctl  disable   firewalld                         关闭开机自启动
systemctl  is-enable   firewalld                      查看是否开机自启动状态

##############################################################################################################################################################

/usr/lib/systemd/system  在此目录下存放的所有unit和targe

systemctl list-unit-files                             ##列出所有的服务
systemctl list-units --all --type=service ##查看所有的service

 

posted on 2018-12-23 17:14  yeyu1314  阅读(171)  评论(0)    收藏  举报