Ubuntu16.04 desktop installation and the root account to log on the server and so Ali ECS Error Handling

Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
This link: https://blog.csdn.net/u010608296/article/details/102523468

Ubuntu16.04 desktop installation and the root account to log on the server and so Ali ECS Error Handling

2018-06-28 16:42:45  Cheng, 100-  number 2793 read more

Category Column:  Configuration

Disclaimer: This article is a blogger original article, follow the  CC 4.0 BY-SA  copyright agreement, reproduced, please attach the original source link and this statement.

This link: https://blog.csdn.net/Wolf_flue/article/details/80844444

Recently toss on a cloud server ECS Ali, using a Ubuntu16.04 system, friend's account, get the account, remote connection into the system, the default is given a command window, no graphical interface. I entered a lot of command, the system does not even support, let me re apt-get install to install. At the same time, the installation process is another question arises, source system error has occurred, can not be downloaded. Estimated to be a friend misuse what documents he never played linux, replace the source of this thinking, imagination turned out to be a cloud server, directly to the system replaced on OK, in order to facilitate the use of friends, Ubuntu desktop is installed by the way.

Here putty is connected, a remote connection is similar to the window. (Because after the completion of the project is to write articles, before forgot screenshot)

1, stop the current system

To replace the system, you must first stop the system currently running (in general, need to forcibly stop, please do the data transfer, no data continue)

Status will change to stopped.

2, the system re-select to install.

Click on the name of the server instance, enter the view instance status

选择并设置系统

出现更换成功界面即可

3 进入更换好的系统

3.1 远程连接输入密码进入Ubuntu16.04系统【root账户和密码】

远程登陆后,在终端中输入如下命令:#后面是注释

  1. apt-get update #更新软件源
  2. apt-get upgrade #升级所有软件
  3. apt-get install ubuntu-desktop #安装乌班图桌面

命令执行过程中有2-3次确认,需要输入y,耐心等待。

安装完成后,在终端中输入 reboot now,重启系统

3.2重启系统后,这时需要用到putty或者ssh命令,我这里用的是Putty。

注:我们这时候如果用控制台远程连接,默认进入的账户是Guest,访客权限,很多事情是无权限做的,我们只有通过root权限进入图形界面才有意义,所以我们需要修改文件完成root权限耿璐图形界面。

在下面框中输入服务器的IP地址(公网IP,在实例后台上有)

登陆后的界面(用root账户登录

修改/usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf内容,让root账户远程连接登录图形界面。

修改成如下(添加了后两行内容)【我这里用的是vi编辑器,根据自己会的情况选择编辑器】

修改完成后我们退出vi编辑器,输入reboot重启系统。

接下来在阿里云控制台远程连接中输入密码登录后台,进入后台之后,首先让你输入登录用户名root 然后输入对应密码,即可进入桌面系统。

此时,进入系统中可能会弹出如下提示错误。

如果要修改该错误,可进入/root/.profile文件中【该文件是隐藏文件,进入文件夹可用快捷键Ctrl + H 让其显示出来】

将.profile的内容更改如下【改了最后一行

然后重启系统,便可以用root账户正常登录系统了。

这样,ubuntu上的桌面系统安装结束。

注:

感谢 https://blog.csdn.net/qq_37608398/article/details/78155568?locationNum=9&fps=1 提供参考指导。

Guess you like

Origin blog.csdn.net/u010608296/article/details/102523468