修改centos 6 启动级别 - /etc/inittab
原创    bluesky    发表于:2018-02-08 14:29:33
  阅读 :83   收藏   编辑

超级管理员修改文件:vim /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:
~

该文件定义了6个级别,

  • 0 关机

  • 1 单用户模式

  • 2 不带网络的多用户模式

  • 3 带网络的多用户,也就是所谓的纯字符模式

  • 4 保留,用户可以自给定义

  • 5 图形界面的多用户模式

  • 6 重起系统

将5改为3 ,即可默认进入字符模式,在字符模式下执行“startx”即可进行图像界面

评论
条评论