Contents
  1. 1. 下载-镜像地址
  2. 2. zsync镜像更新
  3. 3. 命令行升级Ubuntu
  4. 4. 替换软件更新源
  5. 5. ubuntu use YUM

下载-镜像地址

http://mirrors.ustc.edu.cn/ubuntu-releases/

http://mirrors.163.com/ubuntu-releases/

zsync镜像更新

假设目前已有镜像文件trusty-desktop-amd64.iso,要更新到ubuntu-14.04-desktop-i386.iso

sudo apt-get install zsync
zsync -i trusty-desktop-amd64.iso http://mirrors.ustc.edu.cn/ubuntu-releases/14.04/ubuntu-14.04-desktop-i386.iso.zsync

Read trusty-desktop-amd64.iso. Target 35.3% complete. 实验证明这都能省下1/3的流量]

最好更新后进行镜像的md5校验md5sum ubuntu-14.04-desktop-i386.iso

命令行升级Ubuntu

1
2
3
4
5
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo apt-get install update-manager-core
sudo do-release-upgrade

替换软件更新源

1
2
3
4
5
6
7
8
9
10
11
12
13
14
#确认原来的软件源地址
less /etc/apt/sources.list
# 备份
sudo cp /etc/apt/sources.list /etc/apt/sources.list.old

#假设archive.ubuntu.com替换为mirrors.ustc.edu.cn
#sed在本文内修改
sed -i 's/archive.ubuntu.com/mirrors.ustc.edu.cn/' /etc/apt/sources.list

#使用vi修改
sudo vi /etc/apt/sources.list
:1,$s/archive.ubuntu.com/mirrors.ustc.edu.cn/g

sudo apt-get update

ubuntu use YUM

1
2
sudo apt-get install build-essential
sudo apt-get install yum