查看liunx服务器运行级别

      昨晚重启测试服务器使用命令:shutdown now (忘记了添加-h)致使自动重启而且进入单用户模式,查看当前系统模式命令:runlevellinux

Centos系统:ubuntu

[root@fisheye ~]# runlevel 
N 3

RedHat系列有7个运行级别(runlevel)bash

      运行级别0:系统停机状态,系统默认运行级别不能设为0,不然不能正常启动服务器

      运行级别1:单用户工做状态,root权限,用于系统维护,禁止远程登录ide

      运行级别2:多用户状态(没有NFS)测试

      运行级别3:彻底的多用户状态(有NFS),登录后进入控制台命令行模式spa

      运行级别4:系统未使用,保留命令行

      运行级别5:X11控制台,登录后进入图形GUI模式it

      运行级别6:系统正常关闭并重启,默认运行级别不能设为6,不然不能正常启动class

Ubuntu的默认开机的runlevel是2

yong@test2:~$ runlevel 
N 2

       debian系(ubuntu是基于debian)的Linux一直是用runlevel 2来默认启动,而且runlevel定义也与redhat有区别。debian的runlevel级别定义以下:

       0 – Halt,关机模式

       1 – Single,单用户模式

       2 - Full multi-user with display manager (GUI)

       3 - Full multi-user with display manager (GUI)

       4 - Full multi-user with display manager (GUI)

       5 - Full multi-user with display manager (GUI)

       6 – Reboot,重启

能够发现2~5级是没有任何区别的。他们为多用户模式,这和通常的linux不同。

相关文章
相关标签/搜索