Linux的运行级别
运行级别(Runlevel)指的是Unix或者Linux等类Unix操作系统下不同的运行模式。运行级别通常分为7等,分别是从0到6,但如果必要的话也可以更多。
例如在大多数linux操作系统下一共有如下6个典型的运行级别:
具体可参照 /etc/inittab
# 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 //代表默认的运行级别为3
可以用下面两个命令查看当前的运行级别:
[root@Daruizi ~]# runlevel
N 3
[root@Daruizi ~]# who -r
run-level 3 2011-11-14 02:24
man 命令 详解
[root@Daruizi ~]# man date
DATE(1) User Commands DATE(1)
NAME
date – print or set the system date and timeSYNOPSIS
date [OPTION]… [+FORMAT]
date [-u|--utc|--universal] [MMDDhhmm[[CC]YY][.ss]]DESCRIPTION
Display the current time in the given FORMAT, or set the system date.
