window 10 bash 14.04 升级至16.04

1、获取root权限

sudo passwd root
su root

2、把所有包升级至 14.04 的最新版

aptitude update
aptitude full-upgrade -y

3、更改更新源为16.04

vim /etc/apt/sources.list
# 清空文件后粘贴如以下代码:
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
# :wq 保存退出

4、升级至 16.04

aptitude update
aptitude safe-upgrade -y
#注1:升级过程中会提示你重启服务(restart services),选yes
#注2:还会出现文件冲突,保留当前版本(current version)即可,输入N

5、把所有包升级至 16.04 (xenial) 的最新版,并重装丢失的aptitude包,最后清理无用包

apt-get dist-upgrade
apt-get install aptitude
apt-get autoremove

 

posted @ 2017-11-02 20:45  hbweixiang  阅读(197)  评论(0编辑  收藏  举报