Ubuntu source list和apt-get命令

官方的服务器:

# /etc/apt/sources.list

# deb cdrom:[Ubuntu 9.10 _Karmic Koala_ - Release i386 (20091028.5)]/ karmic main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.

deb http://us.archive.ubuntu.com/ubuntu/ karmic main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ karmic main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ karmic-updates main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ karmic-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://us.archive.ubuntu.com/ubuntu/ karmic universe
deb-src http://us.archive.ubuntu.com/ubuntu/ karmic universe
deb http://us.archive.ubuntu.com/ubuntu/ karmic-updates universe
deb-src http://us.archive.ubuntu.com/ubuntu/ karmic-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://us.archive.ubuntu.com/ubuntu/ karmic multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ karmic multiverse
deb http://us.archive.ubuntu.com/ubuntu/ karmic-updates multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ karmic-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://us.archive.ubuntu.com/ubuntu/ karmic-backports main restricted universe multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ karmic-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 karmic partner
# deb-src http://archive.canonical.com/ubuntu karmic partner

deb http://us.archive.ubuntu.com/ubuntu/ karmic-security main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ karmic-security main restricted
deb http://us.archive.ubuntu.com/ubuntu/ karmic-security universe
deb-src http://us.archive.ubuntu.com/ubuntu/ karmic-security universe
deb http://us.archive.ubuntu.com/ubuntu/ karmic-security multiverse

deb-src http://us.archive.ubuntu.com/ubuntu/ karmic-security multiverse

搜狐的服务器:

deb http://mirrors.sohu.com/ubuntu/ lucid main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ lucid-security main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ lucid-updates main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ lucid-proposed main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ lucid-backports main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ lucid main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ lucid-security main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ lucid-updates main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ lucid-proposed main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ lucid-backports main restricted universe multiverse 


163的服务器:

deb http://mirrors.163.com/ubuntu/ jaunty main restricted universe multiverse

deb http://mirrors.163.com/ubuntu/ jaunty-security main restricted universe multiverse

deb http://mirrors.163.com/ubuntu/ jaunty-updates main restricted universe multiverse

deb http://mirrors.163.com/ubuntu/ jaunty-proposed main restricted universe multiverse

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

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

deb-src http://mirrors.163.com/ubuntu/ jaunty-security main restricted universe multiverse

deb-src http://mirrors.163.com/ubuntu/ jaunty-updates main restricted universe multiverse

deb-src http://mirrors.163.com/ubuntu/ jaunty-proposed main restricted universe multiverse

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

 

其他参照

http://wiki.ubuntu.org.cn/%E6%BA%90%E5%88%97%E8%A1%A8

 

apt-get命令:

apt-cache search package 搜索包

apt-cache show package 获取包的相关信息,如说明、大小、版本等

sudo apt-get install package 安装包

sudo apt-get install package - - reinstall 重新安装包

sudo apt-get -f install 修复安装"-f = ——fix-missing"

sudo apt-get remove package 删除包

sudo apt-get remove package - - purge 删除包,包括删除配置文件等

sudo apt-get update 更新源

sudo apt-get upgrade 更新已安装的包

sudo apt-get dist-upgrade 升级系统

sudo apt-get dselect-upgrade 使用 dselect 升级

apt-cache depends package 了解使用依赖

apt-cache rdepends package 是查看该包被哪些包依赖

sudo apt-get build-dep package 安装相关的编译环境

apt-get source package 下载该包的源代码

sudo apt-get clean && sudo apt-get autoclean 清理无用的包

sudo apt-get check 检查是否有损坏的依赖

你可能感兴趣的:(apt-get)