c语言编程基础------0.4.4 ubuntu 12.04 LTS 如何使用更快的更新源

装好ubuntu系统后的第一见事就是替换自带的更新源,原因是系统自带的源有些在中国访问不了,可以访问的速度又特别慢。幸好国内的一些公司和大学提供了速度不错的更新源。下面介绍如何使用更快的更新源

方法/步骤

  1.  备份sources.list文件:

         

    sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup (备份下当前的源列表)

  2.  打开sources.list:

        sudo gedit /etc/apt/sources.list

    ubuntu 12.04 LTS 如何使用更快的更新源
  3. 修改sources.list,将sources.list内容全部替换为以下内容:

    # 电子科大(教育网用户推荐)

    deb http://ubuntu.uestc.edu.cn/ubuntu/ precise main restricted universe multiverse

    deb http://ubuntu.uestc.edu.cn/ubuntu/ precise-backports main restricted universe multiverse

    deb http://ubuntu.uestc.edu.cn/ubuntu/ precise-proposed main restricted universe multiverse

    deb http://ubuntu.uestc.edu.cn/ubuntu/ precise-security main restricted universe multiverse

    deb http://ubuntu.uestc.edu.cn/ubuntu/ precise-updates main restricted universe multiverse

    deb-src http://ubuntu.uestc.edu.cn/ubuntu/ precise main restricted universe multiverse

    deb-src http://ubuntu.uestc.edu.cn/ubuntu/ precise-backports main restricted universe multiverse

    deb-src http://ubuntu.uestc.edu.cn/ubuntu/ precise-proposed main restricted universe multiverse

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

    deb-src http://ubuntu.uestc.edu.cn/ubuntu/ precise-updates main restricted universe multiverse

    # 中国科技大学(教育网用户推荐)

    deb http://debian.ustc.edu.cn/ubuntu/ precise main restricted universe multiverse

    deb http://debian.ustc.edu.cn/ubuntu/ precise-backports restricted universe multiverse

    deb http://debian.ustc.edu.cn/ubuntu/ precise-proposed main restricted universe multiverse

    deb http://debian.ustc.edu.cn/ubuntu/ precise-security main restricted universe multiverse

    deb http://debian.ustc.edu.cn/ubuntu/ precise-updates main restricted universe multiverse

    deb-src http://debian.ustc.edu.cn/ubuntu/ precise main restricted universe multiverse

    deb-src http://debian.ustc.edu.cn/ubuntu/ precise-backports main restricted universe multiverse

    deb-src http://debian.ustc.edu.cn/ubuntu/ precise-proposed main restricted universe multiverse

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

    deb-src http://debian.ustc.edu.cn/ubuntu/ precise-updates main restricted universe multiverse

    # 北京理工(教育网用户推荐)

    deb http://mirror.bjtu.edu.cn/ubuntu/ precise main multiverse restricted universe

    deb http://mirror.bjtu.edu.cn/ubuntu/ precise-backports main multiverse restricted universe

    deb http://mirror.bjtu.edu.cn/ubuntu/ precise-proposed main multiverse restricted universe

    deb http://mirror.bjtu.edu.cn/ubuntu/ precise-security main multiverse restricted universe

    deb http://mirror.bjtu.edu.cn/ubuntu/ precise-updates main multiverse restricted universe

    deb-src http://mirror.bjtu.edu.cn/ubuntu/ precise main multiverse restricted universe

    deb-src http://mirror.bjtu.edu.cn/ubuntu/ precise-backports main multiverse restricted universe

    deb-src http://mirror.bjtu.edu.cn/ubuntu/ precise-proposed main multiverse restricted universe

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

    deb-src http://mirror.bjtu.edu.cn/ubuntu/ precise-updates main multiverse restricted universe

    # 163(非教育网推荐)

    deb http://mirrors.163.com/ubuntu/ precise main restricted

    deb-src http://mirrors.163.com/ubuntu/ precise main restricted

    deb http://mirrors.163.com/ubuntu/ precise-updates main restricted

    deb-src http://mirrors.163.com/ubuntu/ precise-updates main restricted

    deb http://mirrors.163.com/ubuntu/ precise universe

    deb-src http://mirrors.163.com/ubuntu/ precise universe

    deb http://mirrors.163.com/ubuntu/ precise-updates universe

    deb-src http://mirrors.163.com/ubuntu/ precise-updates universe

    deb http://mirrors.163.com/ubuntu/ precise multiverse

    deb-src http://mirrors.163.com/ubuntu/ precise multiverse

    deb http://mirrors.163.com/ubuntu/ precise-updates multiverse

    deb-src http://mirrors.163.com/ubuntu/ precise-updates multiverse

    deb http://mirrors.163.com/ubuntu/ precise-backports main restricted universe multiverse

    deb-src http://mirrors.163.com/ubuntu/ precise-backports main restricted universe multiverse

    deb http://mirrors.163.com/ubuntu/ precise-security main restricted

    deb-src http://mirrors.163.com/ubuntu/ precise-security main restricted

    deb http://mirrors.163.com/ubuntu/ precise-security universe

    deb-src http://mirrors.163.com/ubuntu/ precise-security universe

    deb http://mirrors.163.com/ubuntu/ precise-security multiverse

    deb-src http://mirrors.163.com/ubuntu/ precise-security multiverse

    deb http://extras.ubuntu.com/ubuntu precise main

    deb-src http://extras.ubuntu.com/ubuntu precise main

    # sohu(非教育网推荐)

    deb http://mirrors.sohu.com/ubuntu/ precise main restricted

    deb-src http://mirrors.sohu.com/ubuntu/ precise main restricted

    deb http://mirrors.sohu.com/ubuntu/ precise-updates main restricted

    deb-src http://mirrors.sohu.com/ubuntu/ precise-updates main restricted

    deb http://mirrors.sohu.com/ubuntu/ precise universe

    deb-src http://mirrors.sohu.com/ubuntu/ precise universe

    deb http://mirrors.sohu.com/ubuntu/ precise-updates universe

    deb-src http://mirrors.sohu.com/ubuntu/ precise-updates universe

    deb http://mirrors.sohu.com/ubuntu/ precise multiverse

    deb-src http://mirrors.sohu.com/ubuntu/ precise multiverse

    deb http://mirrors.sohu.com/ubuntu/ precise-updates multiverse

    deb-src http://mirrors.sohu.com/ubuntu/ precise-updates multiverse

    deb http://mirrors.sohu.com/ubuntu/ precise-backports main restricted universe multiverse

    deb-src http://mirrors.sohu.com/ubuntu/ precise-backports main restricted universe multiverse

    deb http://mirrors.sohu.com/ubuntu/ precise-security main restricted

    deb-src http://mirrors.sohu.com/ubuntu/ precise-security main restricted

    deb http://mirrors.sohu.com/ubuntu/ precise-security universe

    deb-src http://mirrors.sohu.com/ubuntu/ precise-security universe

    deb http://mirrors.sohu.com/ubuntu/ precise-security multiverse

    deb-src http://mirrors.sohu.com/ubuntu/ precise-security multiverse

    deb http://extras.ubuntu.com/ubuntu precise main

    deb-src http://extras.ubuntu.com/ubuntu precise main

  4. 保存对source.list的修改。

  5. 更新源信息:

        sudo apt-get update

    ubuntu 12.04 LTS 如何使用更快的更新源
    END


在这之后,就可以用命令去下载更新东西了。

  sudo apt-get install libc6-dev

  sudo apt-get source  libc6-dev

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值