ubuntu 软件源设置

写在前面:浏览了很多国内外的网站,看了很多关于软件源(Software Sources)设置的文章,发现有很多文章中对软件源的设置存在误解,为了让新人能顺利进入Ubuntu的大家庭,特地作此文,详细地介绍下软件源的设置。

 

1、软件源(Software Sources)是什么?

在Ubuntu中,软件源是指一个由可以获得软件的地址组成的集合,这个地址可以是网站、光盘,或者是硬盘上的一个目录。软件源上有“软件仓库”, 软件 仓库中存储着各种各样的软件。当你需要用到一个软件的时候,就可以通过工具(新立得synaptic 、 apt-get 或者 aptitude 等),自动地下载并自动地安装。

2、软件源(Software Sources)设置好了,我可以获得哪些便利?

日常的软件安装或者更新都是采用从软件源获取软件包的方式。设置好软件源可以让你及时获取重要的安全更新,解决安全隐患;或者修复已知的问题,让使用更顺手。设置好软件源同样可以加快以上操作的速度,节约你宝贵的时间。

3、我是新手,我不会设置,有简单的图形化界面的设置方法吗?

Ubuntu的系统(System)-系统管理(Administration)菜单里提供了图形化界面的软件源设置(Software Sources)程序,不过提醒一下大家,只使用这个是不够的!(具体设置方法请继续往下看)

4、正确的设置方法!

在开始修改设置之前,先备份一下原来的设置。这一步看似多余,其实是一种很好的习惯,有利于配置错误时的恢复。备份方法是:按Alt+F2,然后输 入 gksu cp /etc/apt/sources.list /etc/apt/sources.list-backup。回车后输入你的密码。

然后打开设置程序:系统(System)-系统管理(Administration)-软件源设置(Software Sources)。在第一个标签页上,单击“下载自(Download From)”右边的菜单,选择“其他…(Others…)”。然后在弹出的窗口中单击“选择最佳服务器(Select Best Server)”。下面系统会自动ping官方服务器列表中的服务器,并选择最快的!

再按Alt+F2打开“运行程序(Run Application)”,输入 gksu gedit /etc/apt/sources.list。回车后如果有提示输入密码,输入你的密码。把光标调到文件的最后。

(1)电信用户加入下面的内容:

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
deb http://ubuntu.cn99.com/ubuntu-cn hardy main restricted universe multiverse
deb http://us.archive.ubuntu.com/ubuntu/ hardy main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ hardy restricted main universe
deb http://us.archive.ubuntu.com/ubuntu/ hardy universe
deb http://us.archive.ubuntu.com/ubuntu/ hardy-updates universe
deb-src http://us.archive.ubuntu.com/ubuntu/ hardy-updates universe
deb http://archive.ubuntu.com/ubuntu/ hardy main restricted
deb-src http://archive.ubuntu.com/ubuntu/ hardy restricted main universe
deb http://archive.ubuntu.com/ubuntu/ hardy universe
deb http://archive.ubuntu.com/ubuntu/ hardy-updates universe
deb-src http://archive.ubuntu.com/ubuntu/ hardy-updates universe #Added by software-properties
deb http://security.ubuntu.com/ubuntu hardy-security main restricted
deb-src http://security.ubuntu.com/ubuntu hardy-security restricted main universe
deb http://security.ubuntu.com/ubuntu hardy-security universe

(2)网通/教育网用户加入下面的内容:

deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ hardy main restricted universe multiverse
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ hardy main restricted universe multiverse
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ hardy-updates main restricted universe multiverse
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ hardy-updates main restricted universe
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值