完成遠程鏈接之後就能夠安裝圖形化界面,不過也要看你的服務器配置,配置低了會比較卡
本篇文章參考了這篇文章連接描述shell
安裝步驟:ubuntu
先使用阿里雲或者putty遠程鏈接上服務器之後再執行如下操做windows
輸入如下代碼bash
更新軟件庫apt-get update
服務器
升級軟件apt-get upgrade
session
安裝ubuntu桌面系統apt-get install ubuntu-desktop
工具
重啓服務器 reboot
阿里雲
這樣已經完成圖形化界面,可是隻有guest帳號,guest帳號沒什麼用,咱們須要的是rootspa
咱們須要進入服務器後臺,修改root權限,修改 /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf 文件。.net
這個地方尤爲須要注意:由於遠程進入阿里雲服務器,只能使用guest賬號,可是guest賬號是沒有權限修改這個文件的。因此,咱們須要在windows端,使用上面提到的putty工具,以root賬號(使用putty工具進入能夠指定登陸用戶),遠程登陸進入,這樣就能夠修改這個文件了。
# 文件 /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf # 修改前 [Seat:*] user-session=ubuntu # 修改後 [Seat:*] user-session=ubuntu greeter-show-manual-login=true allow-guest=false
修改完文件以後,如上圖執行reboot,重啓服務器。重啓以後就能夠用root用戶登陸,可是登陸後仍是有警告,這個須要修改 /root/.profile 文件。
修改爲以下所示:
# 文件 /root/.profile # 文件修改前 # ~/.profile: executed by Bourne-compatible login shells. if [ "$BASH" ]; then if [ -f ~/.bashrc ]; then . ~/.bashrc fi fi mesg n || true # 文件修改後 # ~/.profile: executed by Bourne-compatible login shells. if [ "$BASH" ]; then if [ -f ~/.bashrc ]; then . ~/.bashrc fi fi tty -s && mesg n || true
再執行 reboot 命令,重啓服務器,重啓以後,只有root用戶,登陸後也沒有警告信息了