Ubuntu/Debian系统包管理常用命令

Ubuntu/Debian系统包管理常用命令

sudo apt-get update 同步软件源中的软件索引文件,并更新本地的cache

sudo apt-get upgrade 根据软件源的要求,安装(升级)最新的软件包。注意,所谓“最新”是指当前系统版本所能支持的最新软件包,而不是最新系统版本所能支持的软件包。

sudo apt-get autoremove 自动删除某些不再需要的软件包。

sudo apt-get install 安装具体某个软件,例如sudo apt-get install qtcreator就是安装qtcreator软件。

sudo apt-get remove 卸载某个软件包

下面是两个常用的软件包查询命令:

sudo apt-cache search 搜索某个软件。最好和grep配合起来用,很方便。例如sudo apt-cache search python | grep mysql 就是所有python软件包中,与mysql相关的包。

sudo apt-cache show 显示某个软件包的具体信息,包括依赖关系等。

Comments are closed.