cat /etc/apt/sources.list
deb http://mirrors.sohu.com/ubuntu/ precise main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ precise-security main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ precise-updates main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ precise-backports main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ precise main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ precise-security main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ precise-updates main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ precise-backports main restricted universe multiverse
==================
source.list_163: #改成以下内容 亲测
- deb http://mirrors.163.com/ubuntu/ precise main universe restricted multiverse
- deb-src http://mirrors.163.com/ubuntu/ precise main universe restricted multiverse
- deb http://mirrors.163.com/ubuntu/ precise-security universe main multiverse restricted
- deb-src http://mirrors.163.com/ubuntu/ precise-security universe main multiverse restricted
- deb http://mirrors.163.com/ubuntu/ precise-updates universe main multiverse restricted
- deb http://mirrors.163.com/ubuntu/ precise-backports universe main multiverse restricted
- deb-src http://mirrors.163.com/ubuntu/ precise-backports universe main multiverse restricted
- deb-src http://mirrors.163.com/ubuntu/ precise-updates universe main multiverse restricted
========================
sudo apt-get update
sudo apt-get dist-upgrade
apt-get dist-upgrade 这个是只升级内核,,别的不升级。还有,若不是开发,内核没必要升级,若是开发就不应该用ubuntu,而应是fedora
apt-get
Here is quick cheat sheet you will find handy while using apt-get at shell prompt:
Syntax | Description | Example(s) |
apt-get install {package} | Install the new package. If package is installed then try to upgrade to latest version | apt-get install zip apt-get install lsof samba mysql-client |
apt-get remove {package} | Remove/Delete an installed package except configuration files | apt-get remove zip |
apt-get --purge remove {package} | Remove/Delete everything including configuration files | apt-get --purge remove mysql-server |
apt-get update apt-get upgrade |
Resynchronize the package index files and Upgrade the Debian Linux system including security update (Internet access required) | apt-get update apt-get upgrade |
apt-get update apt-get dist-upgrade |
Usually use to upgrade to Debian distribution. For example Woody to Sarge upgrade. 'dist-upgrade' in addition to performing the function of upgrade, also intelligently handles changing dependencies with new versions of packages; apt-get has a "smart" conflict resolution system, and it will attempt to upgrade the most important packages at the expense of less important ones if necessary. | apt-get update apt-get dist-upgrade |
安装或升级系统分下面几个步骤。
第一步,获得最近的软件包的列表;列表中包含一些包的信息,比如这个包是否更新过。
第二步,如果这个包没有发布更新,就不管它;
如果发布了更新,就把包下载到电脑上,并安装。
apt-get update对应的就是第一步。
apt-get upgrade 与apt-get dist-upgrade对应的是第二步。
由于包与包之间存在各种依赖关系。upgrade只是简单的更新包,不管这些依赖,它不和添加包,或是删除包。而dist-upgrade可以根据依赖关系的变化,添加包,删除包。
一般在运行upgrade或dist-upgrade之间,要运行update.
支持新硬件 解决bug 提升效率,支持新功能,主要面向网络、开发、服务应用的。 不升级也没坏处,如果你注意RH系列的操作系统就该知道,面向个人桌面的fedora每半年就会出一个新版本,内核都已经升级到2.6.3x了。而面向服务器领域的RHEL和CentOS才到5.5,内核版本不详,但5.3的内核才2.6.18,差了十来个档次。就是因为服务器领域的操作系统要考虑更多稳定方面的因素才不会随意地发布新版。 如果你是个人电脑,升级内核就当练手了。不过提醒,如果你没玩过,升级内核的后果一是系统崩溃,二是耗时极长劳心费神,三是不知筛选升级内容导致内核超大系统效率反而下降。