码迷,mamicode.com
首页 > 系统相关 > 详细

ubuntu18.04进不了桌面

时间:2019-03-15 01:10:02      阅读:620      评论:0      收藏:0      [点我收藏+]

标签:win   hive   windows   uri   内容   nload   --   virt   提示   

ubuntu升级18.04进不了桌面 

https://chengfeng.site/2018/05/02/ubuntu%E5%8D%87%E7%BA%A718-04%E8%B8%A9%E7%9A%84%E5%9D%91/

4月26日,ubuntu如期发布了其长期稳定版18.04,我的虚拟机内ubuntu是16.04,第一时间就升级了,除了遇到一个显卡驱动兼容问题外,一切都很顺利。解决这个问题也很简单,在virtualbox设置界面中[显示]选项去掉启用3D加速即可。

看起来升级挺容易,没什么问题,于是决定升级下公司工作用的那台ubuntu了。版本是17.04的,之前升级过一次,后边没有再次升级到最新的17.10。网上找了一圈,好像没办法直接从17.04升级到18.04,也就没管了,直接用官方的方式先升级到17.10。

电脑比较渣,升级了半天才搞完,重启后发现进不了桌面了,这就有点尴尬了。没别的办法google走起,方法也就是重装桌面什么的。

“ctrl alt + f2”进入命令行界面后,鼓捣了下似乎没啥作用,问题是apt update就执行不了。有点不想弄了,准备直接重装,反正u盘都刻好了。但看了ubuntu提示当前版本17.10有新版本18.04可以升级,抱着试一试的态度直接又执行升级了,万一升级后就好了呢!就像windows的重启大法一样。

等折腾了半天新版本升级安装完成后,发现问题还是存在,继续进不了桌面。这下没法子了,只能硬着头皮网上找方法。

找到的方法就是重装桌面

sudo apt-get update

sudo apt-get install --reinstall ubuntu-desktop

sudo apt-get install unity

第一条执行就报错了

? ~ sudo apt-get update 
Err:1 http://archive.ubuntu.com/ubuntu bionic InRelease
Could not resolve ‘archive.ubuntu.com‘
Err:2 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Could not resolve ‘archive.ubuntu.com‘
Err:3 http://archive.ubuntu.com/ubuntu bionic-backports InRelease
Could not resolve ‘archive.ubuntu.com‘
Err:4 http://archive.ubuntu.com/ubuntu bionic-security InRelease
Could not resolve ‘archive.ubuntu.com‘
Reading package lists... Done
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic/InRelease Could not resolve ‘archive.ubuntu.com‘
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-updates/InRelease Could not resolve ‘archive.ubuntu.com‘
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-backports/InRelease Could not resolve ‘archive.ubuntu.com‘
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-security/InRelease Could not resolve ‘archive.ubuntu.com‘
W: Some index files failed to download. They have been ignored, or old ones used instead.

排查了下是dns的问题,于是

sudo vim /etc/resolv.conf

nameserver 8.8.8.8

然后还是不行

? ~ sudo apt-get update 
Hit:1 http://archive.ubuntu.com/ubuntu bionic InRelease

这个是之前编辑过源的问题,只能是重新搞回来了。正好虚拟机的sources.list可以参考

vim /etc/apt/sources.list

写入如下内容

deb http://archive.ubuntu.com/ubuntu bionic main restricted

deb http://archive.ubuntu.com/ubuntu bionic-updates main restricted


deb http://archive.ubuntu.com/ubuntu bionic universe


deb http://archive.ubuntu.com/ubuntu bionic-updates universe
deb http://archive.ubuntu.com/ubuntu bionic multiverse
deb http://archive.ubuntu.com/ubuntu bionic-updates multiverse
deb http://archive.ubuntu.com/ubuntu bionic-backports main restricted universe multiverse

deb http://archive.ubuntu.com/ubuntu bionic-security main restricted
deb http://archive.ubuntu.com/ubuntu bionic-security universe
deb http://archive.ubuntu.com/ubuntu bionic-security multiverse

然后执行安装,重启搞定

18.04桌面有一个回收站和挂载的盘,因为我个人喜欢干干净净的桌面,所以想关掉这些图标,而且窗口的控制最大化、最小化和关闭页挪到了右边有点不喜欢,这些都可以通过安装gnome-tweak-tool来解决

sudo apt-get install gnome-shell gnome-tweak-tool

打开tewak就可以设置这些内容了

去掉桌面图标

技术图片

窗口控制按钮挪到左边

技术图片

到这里基本就可以愉快的使用新版ubuntu 18.04了。

ubuntu18.04进不了桌面

标签:win   hive   windows   uri   内容   nload   --   virt   提示   

原文地址:https://www.cnblogs.com/jiangfeilong/p/10534574.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!