chkconfig --add/--del xxx
chkconfig xxx off/on
- crontab 定时任务,也能起到自启动的目的,比较类似
[logig@localhost /home]$ systemctl disable nginx
nginx.service is not a native service, redirecting to /sbin/chkconfig.
Executing /sbin/chkconfig nginx off
You do not have enough privileges to perform this operation.
service xxx start/stop/status...
是对 systemctl start/stop/status/mask... xxx
的不完整封装
- 系统服务(native service)需要用
systemctl enable/disable/mask/unmask/show...
命令来查看和控制
- https://linux.cn/article-5926-1.html
systemctl list-unit-files --type=service|grep enabled # 查看开机启动的服务