apt-get的用法总结(持续更新)
来源:互联网 发布:下载烈火软件 编辑:程序博客网 时间:2024/06/05 00:21
apt是Debian系统中的软件包管理器,日常安装、卸载、配置软件都靠它。apt的命令繁多,不易记住,写在这里,以备参考。
* apt源
源,即下载软件包的地址,在Debian中为/etc/apt/sources.list 文件。以下配置使用163作为源服务器。
# 163
deb http://mirrors.163.com/debian wheezy main non-free contrib
deb http://mirrors.163.com/debian wheezy-proposed-updates main contrib non-free
deb-src http://mirrors.163.com/debian wheezy main non-free contrib
deb-src http://mirrors.163.com/debian wheezy-proposed-updates main contrib non-free
deb http://mirrors.163.com/debian-security wheezy/updates main contrib non-free
deb-src http://mirrors.163.com/debian-security wheezy/updates main contrib non-free
deb http://http.us.debian.org/debian wheezy main contrib non-free
# this one is not used any more
# deb http://non-us.debian.org/debian-non-US wheezy/non-US main contrib non-free
deb http://security.debian.org wheezy/updates main contrib non-free
* apt命令自动补全
首先需要安装bash-completion,一般Debian默认已经安装。
># apt-get install bash-completion
然后在~/.bashrc中有如下配置(若没有,自己加上即可)
# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if ! shopt -oq posix; then
if [ -f /usr/share/bash-completion/bash_completion ]; then
. /usr/share/bash-completion/bash_completion
elif [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
fi
* apt常用命令
- apt-get update 更新源
- apt-get install {package-name} 安装软件包
- apt-get upgrade 更新已安装的软件包
- apt-get dist-upgrade 升级系统
- apt-get clean 清理无用的软件包
- apt-get autoclean 清理无用的软件包
- apt-get remove {package-name} 卸载软件包
- apt-get autoremove 自动卸载无用的软件包
- apt-cache search {keyword} 查找keyword为关键字的软件包
- apt-cache show {package-name} 显示软件包的信息,包括版本、大小、依赖等。
reference:
[1] http://os.51cto.com/art/200802/65583.htm
- apt-get的用法总结(持续更新)
- apt-get的用法
- python中随机数的用法总结 (持续更新)
- apt-get install 的用法
- apt-get install 的用法
- apt-get 的常规用法
- 罕见的C用法(持续更新)
- tableView的一些用法(持续更新)
- linux 更新apt-get
- Xcode的小总结(持续更新)
- Ubuntu下 apt-get的用法
- Ubuntu下apt-get的用法
- Ubuntu下apt-get的用法
- apt-get的意义和用法
- Ubuntu中apt-get的用法
- apt-get-repository app的用法
- ubuntu apt-get install 的用法
- apt-get的用法(16之后已经升级为apt)
- C++ try的实现
- HDU 2066
- android键盘挡住界面
- C、C++、Java异或运算交换变量变量值的区别
- 数组循环移位算法
- apt-get的用法总结(持续更新)
- KMP 算法简述
- OCP-1Z0-051 第81题 SYSDATE函数
- android listview 异步加载图片并防止错位
- struts2多文件上传(修改名称、压缩图片、删除图片)
- 10个迷惑新手的Cocoa,Objective-c开发难点和问题
- 动态链接库和静态链接库的创建及应用实例
- C/C++学习
- 易触网的CSDN博客成立了