VPS侦探论坛
标题:
CentOS/Debian/Ubuntu 查看/启用/禁用开机启动项/服务教程(systemd)
[打印本页]
作者:
licess
时间:
2020-11-23 17:07
标题:
CentOS/Debian/Ubuntu 查看/启用/禁用开机启动项/服务教程(systemd)
开机启动项查看适用于比较新的Linux发行版,CentOS/Debian/Ubuntu等只要是使用systemd管理的都可以。
查看开机启动项的服务:
systemctl list-unit-files --type=service|grep enabled
复制代码
如何禁用httpd/apache服务开机启动:
systemctl disable httpd.service
复制代码
如何启用httpd/apache服务开机启动:
systemctl enable httpd.service
复制代码
如果是其他的服务就把前面命令中的 httpd.service 换成其他的,如mysql.service、nginx.service 等
欢迎光临 VPS侦探论坛 (https://bbs.lnmp.com/)
Powered by Discuz! X3.4