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 条评论

发表回复

Avatar placeholder

您的电子邮箱地址不会被公开。 必填项已用 * 标注