Systemctl

启动、重启、停止、重载服务以及检查服务(如 httpd.service)状态

systemctl的start,restart,stop和reload命令时,我们不会从终端获取到任何输出内容,只有status命令可以打印输出。

  1. # systemctl start httpd.service
  2. # systemctl restart httpd.service
  3. # systemctl stop httpd.service
  4. # systemctl reload httpd.service
  5. # systemctl status httpd.service

激活服务并在启动时启用或禁用服务(即系统启动时自动启动服务)

  1. # systemctl is-active httpd.service
  2. # systemctl enable httpd.service
  3. # systemctl disable httpd.service

 

posted @ 2021-09-29 14:06  哦哦QAQ  阅读(55)  评论(0)    收藏  举报