Centos7 安装图形界面

Centos7 和centos6.X的系统会很多不一样比如安装图形界面
在Centos7里我们查看下当前的运行级别并安装图形化组件:

[root@cloud ~]# systemctl get-default  
multi-user.target
[root@cloud ~]#
[root@cloud ~]# cat /etc/inittab
# inittab is no longer used when using systemd.
#
# ADDING CONFIGURATION HERE WILL HAVE NO EFFECT ON YOUR SYSTEM.
#
# Ctrl-Alt-Delete is handled by /etc/systemd/system/ctrl-alt-del.target
#
# systemd uses 'targets' instead of runlevels. By default, there are two main targets:
#
# multi-user.target: analogous to runlevel 3                \\运行级别3:多用户界面
# graphical.target: analogous to runlevel 5                  \\运行级别5:图形化界面
# # To set a default target, run: # # ln -sf /lib/systemd/system/.target 

/etc/systemd/system/default.target #

[root@cloud ~]# #yum -y groupinstall "Server with GUI"    \\ 安装图形化程序组
[root@cloud ~]# systemctl set-default graphical.target \\设置默认图形化运行级别
[root@cloud ~]#startx    \\启动图形化界面
comments powered by Disqus