centos开机启动项管理

开机启动项管理,centos6使用的是chkconfig,centos7使用的是systemctl

chkconfig

1.开机启动服务查询:chkconfig --list
2.删除开机启动项:chkconfig --del 服务名
3.添加开机启动项:服务必须要在/etc/init.d目录下能查询到,chkconfig --add 服务名,默认开启的服务0-6都为关闭状态。开启或关闭某个启动项(启动项:0,关机模式;1,单用户模式;2,无网络服务的多用户模式;3,多用户模式;4,自定义模式;5,图形界面模式;6,重启模式):

chkconfig  --level  35 服务名   on/off

systemctl

1.开启服务:systemctl enable 服务名
2.关闭服务:systemctl disable 服务名
3.查看开机启动项:systemctl list-unit-files

发布了21 篇原创文章 · 获赞 0 · 访问量 580

猜你喜欢

转载自blog.csdn.net/u014270566/article/details/104360021