chkconfig 命令是Redhat系列的Linux系统中的系统服务管理工具,它可以用于查询和更新不同的运行等级下系统服务的启动状态。

chkconfig命令的参数选项及说明

--list    显示不同运行级别下服务的启动状态
--add     添加一个系统服务
--del     删除一个系统服务
--level   指定运行级别

以下是运行级别说明。
0:关机。
1:单用户模式。
2:没有网络的多用户模式。
3:完全的多用户模式。
4:没有使用的级别。
5:图形界面多用户模式。
6:重启。

了解chkconfig原理。
chkconfig 的原理是在 runlevel级别的 /etc/rc.d/rc*.d目录中将对应服务做一个以S或K开头的软链接。

[root@linuxprobe ~]# ll /etc/rc.d/rc3.d/             
total 0
lrwxrwxrwx. 1 root root 20 Jan 28 21:13 K50netconsole -> ../init.d/netconsole
lrwxrwxrwx. 1 root root 17 Jan 28 21:13 S10network -> ../init.d/network


下面只对rc3.d目录做实验,chkconfig的--level2345是同时对re2.d、rc3.d、re4.d、rc5.d这4个目录进行操作的。







centos 7 下面使用systemctl list-unit-files 查看自启任务
[root@linuxprobe ~]# systemctl list-unit-files
UNIT FILE STATE   
proc-sys-fs-binfmt_misc.automount static  
dev-hugepages.mount static  
dev-mqueue.mount static  
proc-fs-nfsd.mount static  
proc-sys-fs-binfmt_misc.mount static  
sys-fs-fuse-connections.mount static  
sys-kernel-config.mount static  
sys-kernel-debug.mount static  
tmp.mount disabled
var-lib-nfs-rpc_pipefs.mount static  
brandbot.path disabled
systemd-ask-password-console.path static  

最新文章

  1. 理解CSS边框border
  2. SQL SERVER 2008复制数据库时发生执行SQL Server代理作业错误
  3. windows7安装GitBash和GitGui
  4. .NET 3.5 安装错误的四个原因及解决方法
  5. Zxing兼容2.3等低版本
  6. DOM查找元素
  7. POJ 2051
  8. U3D中IOS平台泛型方法尽少使用
  9. start apache2 failed in Ubuntu
  10. 51nod1406 与查询
  11. AsyncTask简单获取网络图片的例子
  12. [BEC][hujiang] Lesson02 Unit1:Working life ---Reading
  13. 想让安卓 APP 如丝般顺滑?
  14. new Date() iso不支持兼容性问题
  15. Implement Queue using Stacks 解答
  16. Java 用Freemarker完美导出word文档(带图片)
  17. 【NOIP2017 OFO(下)】
  18. 零基础开发一款微信小程序商城
  19. mysql索引优化-order/group
  20. 如何在生产环境禁用swagger

热门文章

  1. Day01_04_Java标识符命名规范
  2. Java封装接口统一返回数据模板
  3. 12- APP接口测试以及接口文档的分析
  4. 【接口设计】用户积分排行榜功能-Redis实现
  5. hdu4560 不错的建图,二分最大流
  6. hdu4720 三角形的外接圆
  7. 如何在jQuery的Ajax调用后管理一个重定向请求
  8. Error starting userland proxy: /forwards/expose/port returned unexpected status: 500.
  9. Log4j讲解
  10. python模块一之faker模块