init 运行级别

init 系统运行级别

[root@hexingxing ~]# init 0 #关机
[root@hexingxing ~]# init 1 #单用户
[root@hexingxing ~]# init 2 #不包含 NFS 的多用户
[root@hexingxing ~]# init 3 #多用户
[root@hexingxing ~]# init 4 #未分配
[root@hexingxing ~]# init 5 #图形界面
[root@hexingxing ~]# init 6 #重启
[root@hexingxing ~]# runlevel #查看当前系统运行级别
N 5  ##N 指上个运行级别,5 指当前运行级别
[root@hexingxing ~]# 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:3:initdefault:

提示: id:3:initdefault: #表示当前默认的运行级别为多用户模式
注意: 0 和 6 不可设置为默认,否将永远开不了机

0 条评论

昵称

沙发空缺中,还不快抢~