天天看点

linux运行级别

[root@wangchao ~]# runlevel                //查看运行级别

N 5

查看配置文件

[root@wangchao ~]# 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:

配置文件如上有0~6个级别,id:5:initdefault:默认启动级别5

0.关机

1.单用户

2.多用户无NFS

3.多用户

4.unused 系统保留

5.X11 图形模式

6.重启

重启命令有:init 6、reboot、shutdown -r now

关机命令有:init 0、shutdown -h now

[root@wangchao ~]# yum grouplist                        //查看已安装的文件

[root@wangchao ~]#                           //变成英文显示

[root@wangchao ~]#.UTF-8                  //中文显示

[root@wangchao ~]# yum groupinstall -y "Desktop"          //安装桌面图形化

上一篇: 2.1 运行级别