欢迎来到思考者的博客。本站内容欢迎非商业性转载,请注明出处:http://2006.ghtxx.cn:88/shower/ 如有需要与站长讨论,请QQ:26820218,很高兴与您成为朋友。

sources.list:ubuntu的入门技巧

上一篇 / 下一篇  2008-06-21 21:36:02 / 精华(1) / 个人分类:应用软件

UBUNTU真的很好很强大,对于学习计算机的人来说,它绝对是个比WIN优秀N倍的选择,你的所有操作都可以清晰的向你解释计算机的原理,我们的计算机教育应该以它为平台来开展了,再在WIN平台上开发,对于学生的成长绝对是个不利的选择。
下面说一下这次升级体会吧:
一、不要打开UBUNTU更新源中“不确认就升级“的选项,特别是使用着7.*版的朋友,不然的话你的UBUNTU会立马升到8上去的。我就是这么被迫升级的。

二、一定要先修改源,默认的源速度非常之慢,更新一次基本要N个小时,改为国内的源之后,我在2小时内就完成了全部的更新,ubuntu的更新很多,特别对于习惯使用中文界面的我们来说,大约要下载200m的数据。先用下面的命令打开源列表:
sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup
sudo gedit /etc/apt/sources.list

你看到的应该是下面这样的默认源列表:
# deb cdrom:[Ubuntu 8.04 _Hardy Heron_ - Release i386 (20080423)]/ hardy main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.

deb http://cn.archive.ubuntu.com/ubuntu/ hardy main restricted
deb-src http://cn.archive.ubuntu.com/ubuntu/ hardy main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://cn.archive.ubuntu.com/ubuntu/ hardy-updates main restricted
deb-src http://cn.archive.ubuntu.com/ubuntu/ hardy-updates main restricted

## 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
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
deb http://cn.archive.ubuntu.com/ubuntu/ hardy universe
deb-src http://cn.archive.ubuntu.com/ubuntu/ hardy universe
deb http://cn.archive.ubuntu.com/ubuntu/ hardy-updates universe
deb-src http://cn.archive.ubuntu.com/ubuntu/ hardy-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://cn.archive.ubuntu.com/ubuntu/ hardy multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ hardy multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ hardy-updates multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ hardy-updates multiverse

## Uncomment the following two lines to add software from the 'backports'
## repository.
## 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://cn.archive.ubuntu.com/ubuntu/ hardy-backports main restricted universe multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ hardy-backports main restricted universe 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 hardy partner
deb-src http://archive.canonical.com/ubuntu hardy partner

deb http://security.ubuntu.com/ubuntu hardy-security main restricted
deb-src http://security.ubuntu.com/ubuntu hardy-security main restricted
deb http://security.ubuntu.com/ubuntu hardy-security universe
deb-src http://security.ubuntu.com/ubuntu hardy-security universe
deb http://security.ubuntu.com/ubuntu hardy-security multiverse
deb-src http://security.ubuntu.com/ubuntu hardy-security multiverse

由于我们中国特色的网络速度,咱们在上面的这些源更新时一般只有5000b/s的速度,也就是当年小猫上网的水平,最高也就只能20k/s,所以,不用多想,清除所有内容后,更换为下面的内容:
deb http://archive.ubuntu.org.cn/ubuntu-cn/ hardy main restricted universe multiverse

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://tw.archive.ubuntu.com/ubuntu hardy main restricted universe multiverse
deb http://tw.archive.ubuntu.com/ubuntu hardy-security main restricted universe multiverse
deb http://tw.archive.ubuntu.com/ubuntu hardy-updates main restricted universe multiverse
deb http://tw.archive.ubuntu.com/ubuntu hardy-backports main restricted universe multiverse
deb http://tw.archive.ubuntu.com/ubuntu hardy-proposed main restricted universe multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu hardy main restricted universe multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu hardy-security main restricted universe multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu hardy-updates main restricted universe multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu hardy-backports main restricted universe multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu hardy-proposed main restricted universe multiverse



使用上面的列表后,我的铁通1M ADSL可以保持在120k左右的更新速度,基本上不到一小时就完成了全部的更新

三、再看看GRUB的乱吧:
title        Ubuntu 8.04.1, kernel 2.6.24-18-generic
root        (hd0,2)
kernel        /boot/vmlinuz-2.6.24-18-generic root=UUID=4e2ffd9a-ccdd-4754-9808-3961437a8287 ro quiet splash locale=zh_CN
initrd        /boot/initrd.img-2.6.24-18-generic
quiet

title        Ubuntu 8.04.1, kernel 2.6.24-18-generic (recovery mode)
root        (hd0,2)
kernel        /boot/vmlinuz-2.6.24-18-generic root=UUID=4e2ffd9a-ccdd-4754-9808-3961437a8287 ro single
initrd        /boot/initrd.img-2.6.24-18-generic

title        Ubuntu 8.04.1, kernel 2.6.24-16-generic
root        (hd0,2)
kernel        /boot/vmlinuz-2.6.24-16-generic root=UUID=4e2ffd9a-ccdd-4754-9808-3961437a8287 ro quiet splash locale=zh_CN
initrd        /boot/initrd.img-2.6.24-16-generic
quiet

title        Ubuntu 8.04.1, kernel 2.6.24-16-generic (recovery mode)
root        (hd0,2)
kernel        /boot/vmlinuz-2.6.24-16-generic root=UUID=4e2ffd9a-ccdd-4754-9808-3961437a8287 ro single
initrd        /boot/initrd.img-2.6.24-16-generic

上面这些是更新后多出来的,UBUNTU为什么要出来这么多呢,不知道为什么会这样,很郁闷的哟,而且GRUB的更新是随着系统更新前两行的,如果你像我一样把win的选项移动到了开头,那么在下次更新后你就看不到win的选单了。不过好在ubuntu是很强大的,你只要再修改一下就行了,在选项的最后回上原来的引导命令就行:

# This is a divider, added to separate the menu items below from the Debian
# ones.
title        Other operating systems:
root


# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
title        Windows NT/2000/XP
root        (hd0,0)
savedefault
makeactive
chainloader    +1

这是我的本本上在第一个分区安装XP的命令,如果你的分区不同就要做一些修改了。

最后记一下修改GRUB的命令:
sudo gedit /boot/grub/menu.lst
别忘记是在终端执行它哟。

TAG: ubuntu 笔记 改进 体会 优化

你一思考,我就发笑 引用 删除 JarodLee   /   2008-07-08 11:39:54
sudo /etc/init.d/tor restart
有时候如果发现tor不能工作,可用上面的命令重启一下tor的服务。
你一思考,我就发笑 引用 删除 JarodLee   /   2008-07-04 17:33:03
sudo apt-get install tor
用这个就可以直接安装tor了,记一下,老是忘记。
 

评分:0

我来说两句

显示全部

:loveliness: :handshake :victory: :funk: :time: :kiss: :call: :hug: :lol :'( :Q :L ;P :$ :P :o :@ :D :( :)

Open Toolbar