作者:mobiledu2502897351 | 来源:互联网 | 2017-06-19 11:03
systemd是服务管理程序,他整合了service和chkconfig的功能为一体,可以永久性或只在当前会话中启用/禁用服务。#查看正在运行的服务systemctl#启动,停止,重启服务systemctlstartfoo.servicesystemctlstopfoo.se
systemd是服务管理程序,他整合了service和chkconfig的功能为一体,可以永久性或只在当前会话中启用/禁用服务。
#查看正在运行的服务
systemctl
#启动,停止,重启服务
systemctl start foo.service
systemctl stop foo.service
systemctl restart foo.service
#查看一个服务的状态
systemctl status foo.service
#开机时启用一个服务
systemctl enable foo.service
#开机时关闭一个服务
systemctl disable foo.service
#查看服务是否开机启动
systemctl is-enabled foo.service
例:开机启动sshd服务
systemctl enable sshd.service