Give light and people will find the way
1、查看开机启动项列表(enable表示开机启动,disabled表示开机不启动)
systemctl list-unit-files //开机启动项多时,按空格翻页
有些centos7中装的服务,使用上述命令查不到,此时需要使用chkconfig查看:
chkconfig --list
2、过滤查看某个服务是否开机启动
systemctl list-unit-files |grep xxxxxx
chkconfig --list |grep sshd
3、添加某个服务为开机自动启动
systemctl enable xxxxxxxx
某些服务可能不支持上面的命令,需要使用下面的命令添加 chkconfig --add xxxxxxx chkconfig xxxxxx on
4、取消某个服务的开机启动
systemctl disable xxxxxxxx
使用chkconfig管理的服务需要使用下面的命令取消
chkconfig xxxxxx off chkconfig --del xxxxxxx
Success is a competition with oneself
随机数:302304814815
本文来源于:https://www.fcblog.cn/post/33.html
© 版权声明
文章版权归作者所有,未经允许请勿转载。
本站链接:blog.huangfeiyun.cn
THE END
喜欢就支持一下吧♡