systemctl

许多linux的distributions都已经转投systemd了,而ubuntu自从15.04版本以后都使用了systemd.

只介绍常见常用的命令:
    打开服务:sudo systemctl start foobar
    关闭服务:sudo systemctl stop foobar
    重启服务:sudo systemctl restart foobar
    不中断正常功能下重新加载服务:sudo systemctl reload foobar
    设置服务的开机自启动:sudo systemctl enable foobar
    关闭服务的开机自启动:sudo systemctl disable foobar
    查看活跃的单元:systemctl list-units
    查看某个服务的状态:systemctl status foobar

转自:https://blog.csdn.net/qq_37993487/article/details/79868857

原文地址:https://www.cnblogs.com/tylf-lk/p/10133501.html