红联Linux门户
Linux帮助

Linux启动级别

发布时间:2011-08-17 21:22:57来源:红联作者:专攻Linux/ARM
可以通过查看/etc/inittab 得知Linux的启动级别,一共是从0 ~6 这几种
0:停止计算机
1 或 s:单用户方式
2:多用户,无网络
3:多用户,文本控制台
4:多用户,图形控制台
5:同 4
6:重新引导计算机
[yh1@lzf sbin]$ cat /etc/inittab
# inittab is only used by upstart for the default runlevel.
#
# ADDING OTHER CONFIGURATION HERE WILL HAVE NO EFFECT ON YOUR SYSTEM.
#
# System initialization is started by /etc/init/rcS.conf
#
# Individual runlevels are started by /etc/init/rc.conf
#
# Ctrl-Alt-Delete is handled by /etc/init/control-alt-delete.conf
#
# Terminal gettys are handled by /etc/init/tty.conf and /etc/init/serial.conf,
# with configuration in /etc/sysconfig/init.
#
# For information on how to write upstart event handlers, or how
# upstart works, see init(5), init(8), and initctl(8).
#
# Default runlevel. The runlevels used are:
# 0 - halt (Do NOT set initdefault to this)
# 1 - Single user mode
# 2 - Multiuser, without NFS (The same as 3, if you do not have networking)
# 3 - Full multiuser mode
# 4 - unused
# 5 - X11
# 6 - reboot (Do NOT set initdefault to this)
#
id:5:initdefault:

以上是我的 /etc/inittab 里面的信息,从上面可以知道我是第5种启动方式。

要更改启动方式,可以用命令telinit 1选择单用户模式。接不同数字就表示不同启动模式,提醒一下不要选择第0和6模式哦。至于原因很明显就不说了。
文章评论

共有 4 条评论

  1. NSTcisco 于 2011-08-19 16:01:37发表:

    /etc/inittab 加深印象了,谢谢分享~~

  2. luodeke 于 2011-08-18 17:26:06发表:

    你系统好像是rhel6过后的版本了,因为你的/etc/inittab只有启动级别的功能了。

  3. setlt 于 2011-08-17 22:30:41发表:

    路过支持一下

  4. document 于 2011-08-17 21:35:25发表:

    学习一下