天天看点

ubuntu12.04更换软件源

        在ubuntu下自带的软件源安装软件非常慢,如果想要快速下载东西得更换软件源。而更换软件源的方法很简单。

一  备份系统自带的软件源

终端输入

sudo cp /etc/apt/sources.list /etc/apt/sources_backup.list
           

二  打开系统自带的软件源

终端输入

sudo gedit /etc/apt/sources.list
           

三  替换新的软件源

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://ftp.sjtu.edu.cn/ubuntu/ precise main restricted
deb-src http://ftp.sjtu.edu.cn/ubuntu/ precise main restricted
deb http://cz.archive.ubuntu.com/ubuntu lucid main

## Major bug fix updates produced after the final release of the
## distribution.
deb http://ftp.sjtu.edu.cn/ubuntu/ precise-updates main restricted
deb-src http://ftp.sjtu.edu.cn/ubuntu/ precise-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://ftp.sjtu.edu.cn/ubuntu/ precise universe
deb-src http://ftp.sjtu.edu.cn/ubuntu/ precise universe
deb http://ftp.sjtu.edu.cn/ubuntu/ precise-updates universe
deb-src http://ftp.sjtu.edu.cn/ubuntu/ precise-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://ftp.sjtu.edu.cn/ubuntu/ precise multiverse
deb-src http://ftp.sjtu.edu.cn/ubuntu/ precise multiverse
deb http://ftp.sjtu.edu.cn/ubuntu/ precise-updates multiverse
deb-src http://ftp.sjtu.edu.cn/ubuntu/ precise-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://ftp.sjtu.edu.cn/ubuntu/ precise-backports main restricted universe multiverse
deb-src http://ftp.sjtu.edu.cn/ubuntu/ precise-backports main restricted universe multiverse

deb http://ftp.sjtu.edu.cn/ubuntu/ precise-security main restricted
deb-src http://ftp.sjtu.edu.cn/ubuntu/ precise-security main restricted
deb http://ftp.sjtu.edu.cn/ubuntu/ precise-security universe
deb-src http://ftp.sjtu.edu.cn/ubuntu/ precise-security universe
deb http://ftp.sjtu.edu.cn/ubuntu/ precise-security multiverse
deb-src http://ftp.sjtu.edu.cn/ubuntu/ precise-security multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu precise partner
# deb-src http://archive.canonical.com/ubuntu precise partner

## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
deb http://extras.ubuntu.com/ubuntu precise main
deb-src http://extras.ubuntu.com/ubuntu precise main
deb http://archive.ubuntu.com/ubuntu precise multiverse main universe restricted
deb-src http://archive.ubuntu.com/ubuntu precise universe main multiverse restricted #Added by software-properties

##1 Öйú¿ÆŒŒŽóѧԎ

deb http://debian.ustc.edu.cn/ubuntu/ hardy main multiverse restricted universe
deb http://debian.ustc.edu.cn/ubuntu/ hardy-backports main multiverse restricted universe
deb http://debian.ustc.edu.cn/ubuntu/ hardy-proposed main multiverse restricted universe
deb http://debian.ustc.edu.cn/ubuntu/ hardy-security main multiverse restricted universe
deb http://debian.ustc.edu.cn/ubuntu/ hardy-updates main multiverse restricted universe
deb-src http://debian.ustc.edu.cn/ubuntu/ hardy main multiverse restricted universe
deb-src http://debian.ustc.edu.cn/ubuntu/ hardy-backports main multiverse restricted universe
deb-src http://debian.ustc.edu.cn/ubuntu/ hardy-proposed main multiverse restricted universe
deb-src http://debian.ustc.edu.cn/ubuntu/ hardy-security main multiverse restricted universe
deb-src http://debian.ustc.edu.cn/ubuntu/ hardy-updates main multiverse restricted universe

##2 ±±Ÿ©œ»ŽóÔŽ

deb http://mirror.bjtu.edu.cn/Ubuntu/ hardy main restricted universe multiverse
deb http://mirror.bjtu.edu.cn/Ubuntu/ hardy-backports restricted universe multiverse
deb http://mirror.bjtu.edu.cn/Ubuntu/ hardy-proposed main restricted universe multiverse
deb http://mirror.bjtu.edu.cn/Ubuntu/ hardy-security main restricted universe multiverse
deb http://mirror.bjtu.edu.cn/Ubuntu/ hardy-updates main restricted universe multiverse
deb-src http://mirror.bjtu.edu.cn/Ubuntu/ hardy main restricted universe multiverse
deb-src http://mirror.bjtu.edu.cn/Ubuntu/ hardy-backports main restricted universe multiverse
deb-src http://mirror.bjtu.edu.cn/Ubuntu/ hardy-proposed main restricted universe multiverse
deb-src http://mirror.bjtu.edu.cn/Ubuntu/ hardy-security main restricted universe multiverse
deb-src http://mirror.bjtu.edu.cn/Ubuntu/ hardy-updates main restricted universe multiverse


##4 CN99ÔŽ

deb http://Ubuntu.cn99.com/ubuntu/ hardy main restricted universe multiverse
deb http://Ubuntu.cn99.com/ubuntu/ hardy-security main restricted universe multiverse
deb http://Ubuntu.cn99.com/ubuntu/ hardy-updates main restricted universe multiverse
deb http://Ubuntu.cn99.com/ubuntu/ hardy-proposed main restricted universe multiverse
deb http://Ubuntu.cn99.com/ubuntu/ hardy-backports main restricted universe multiverse
deb-src http://Ubuntu.cn99.com/ubuntu/ hardy main restricted universe multiverse
deb-src http://Ubuntu.cn99.com/ubuntu/ hardy-security main restricted universe multiverse
deb-src http://Ubuntu.cn99.com/ubuntu/ hardy-updates main restricted universe multiverse
deb-src http://Ubuntu.cn99.com/ubuntu/ hardy-proposed main restricted universe multiverse
deb-src http://Ubuntu.cn99.com/ubuntu/ hardy-backports main restricted universe multiverse
           

三  加载软件源,使其生效

保存刚打开的文本文件,在终端输入

sudo apt-get update
           

等命令执行完毕,就成功更新软件源。

PS:

1.该过程可能比较久,请耐心等待

2.可能有一些软件源无法更新,请直接忽略