我是靠谱客的博主 粗暴钢铁侠,这篇文章主要介绍linux 查找自启动的服务,CentOS查看自启动服务,现在分享给大家,希望可以做个参考。

1,查看自启动服务?

2,查看某服务的开机启动状态?

3,启动(关闭,重启,查看)某个服务?

4,设置开机启动或者关闭某个服务?

1,查看自启动服务?

systemctl list-unit-files –type service |grep enabled

2,查看某服务的开机启动状态?

systemctl list-unit-files –type service |grep service_name

3,启动(关闭,重启,查看)某个服务?

(centos6系统):service service_name (start|stop|restart|status)

(centos7系统):systemctl (start|stop|restart|status) service_name

注:centos7系统兼容centos6的启动命令(即7中可以使用6的命令)。

4,设置开机启动或者关闭某个服务?

(centos6系统):

开机启动:chkconfig –add service_name 或者 chkconfig service_name on

开机关闭:chkconfig –del service_name 或者 chkconfig service_name off

(centos7系统):

开机启动:systemctl enable service_name

开机关闭:systemctl disable service_name

最后

以上就是粗暴钢铁侠最近收集整理的关于linux 查找自启动的服务,CentOS查看自启动服务的全部内容,更多相关linux内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(106)

评论列表共有 0 条评论

立即
投稿
返回
顶部