CentOS中管理默认启动方式的文件:inittab

CentOS中默认的启动方式是图形界面(X11),但是我们可以通过修给/etc/inittab文件中的内容来选择系统的默认启动方式,下面是inittab文件中的具体内容:

View Code
 1 # inittab is only used by upstart for the default runlevel.
 2 #
 3 # ADDING OTHER CONFIGURATION HERE WILL HAVE NO EFFECT ON YOUR SYSTEM.
 4 #
 5 # System initialization is started by /etc/init/rcS.conf
 6 #
 7 # Individual runlevels are started by /etc/init/rc.conf
 8 #
 9 # Ctrl-Alt-Delete is handled by /etc/init/control-alt-delete.conf
10 #
11 # Terminal gettys are handled by /etc/init/tty.conf and /etc/init/serial.conf,
12 # with configuration in /etc/sysconfig/init.
13 #
14 # For information on how to write upstart event handlers, or how
15 # upstart works, see init(5), init(8), and initctl(8).
16 #
17 # Default runlevel. The runlevels used are:
18 #   0 - halt (Do NOT set initdefault to this)
19 #   1 - Single user mode
20 #   2 - Multiuser, without NFS (The same as 3, if you do not have networking)
21 #   3 - Full multiuser mode
22 #   4 - unused
23 #   5 - X11
24 #   6 - reboot (Do NOT set initdefault to this)
25 #
26 id:5:initdefault:

设置:id:3:initdefault:,启动的时候就会进入到字符界面,字符界面中使用startx就会切换到图形界面。

注:

Single user mode:单用户模式

Multiuser, without NFS (The same as 3, if you do not have networking):不带网络服务的多用户模式(字符界面)

Full multiuser mode:带网络服务的多用户模式(字符界面)

X11:图形界面

关于X11 gtk qt gnome kde之间的区别和联系,大家可以参考这片文献:

         http://www.cnblogs.com/wangkangluo1/archive/2012/06/14/2548706.html

posted @ 2012-12-08 15:34  CNKing  阅读(812)  评论(0)    收藏  举报