Runlevel笔记

来自三线的随记
Admin讨论 | 贡献2018年11月13日 (二) 00:46的版本

简介

运行级别Runlevel)指的是Unix或者Linux等类Unix操作系统下不同的运行模式。运行级别通常分为 7 等,分别是从 0 到 6 ,但如果必要的话也可以更多。

例如在大多数Linux操作系统下一共有如下7个典型的运行级别:

  • 0 停机,关机
  • 1 单用户,无网络连接,不运行守护进程,不允许非超级用户登录
  • 2 多用户,无网络连接,不运行守护进程
  • 3 多用户,正常启动系统
  • 4 用户自定义
  • 5 多用户,带图形界面
  • 6 重启

/etc/init.d 和 /etc/rc*.d 那些事

  1. /etc/rc*.d ----> The scripts are all symbolic links whose targets are located in /etc/init.d/ 
  2. /etc/rc0.d ---->

Generally it is not necessary to alter the scripts in this directory.

Their purpose is to stop all services and to make the system ready

for shutdown.

3. /etc/rc1.d ----->