runlevel 查看运行级别
.1 运行级别查看
cat /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) 多用户模式,没有NFS,
3 - Full multiuser mode 较完整的多用户模式
4 - unused 保留
5 - X11 图形界面,选装图像相关服务
6 - reboot (Do NOT set initdefault to this)重启
.2 如何安装图形相关界面
yum grouplist 【查看yum列表】
LANG=en 【将grouplist修改成英文】
{LANG=zh_CN.UTF-8 }【改回中文】
yum groupinstall -y “Desktop”
yum groupinstall -y “X Window System”
【-y 的目的是为了在安装过程中减少提示确认的情况】
init 5 == startx【开启图形界面】
.3 重启/关机命令
init 6 == reboot == shutdown -r now 【重启】
init 0 ==shutdown -h now 【关机】