使用VMWare安裝好centos7鏡像後開始安裝centos桌面。html
1、輸入命令centos
yum groupinstall "GNOME Desktop" "Graphical Administration Tools"
(而後發現報錯了「yum安裝軟件提示 cannot find a valid baseurl for repo:base/7/x86_64」,而後整我的都很差了,第一感受是沒連上網。bash
ping一下baidu發現ping不通,通過一番折騰終於找到了解決方法。詳見:centos7 ping不通 name or service not known)post
輸入命令後等待下載,而後一路y下去。url
2、設置系統啓動等級。centos7
systemctl get-default #獲取當前系統運行形式,會顯示multi-user.target(命令行終端),或者:graphical.target systemctl set-default graphical.target #設置默認啓動爲圖形界面,reboot後界面會自動是圖形窗口了。 systemctl set-default multi-user.target #換回命令界面啓動
3、重啓spa
reboot
重啓後默認進入圖形界面。命令行