2.1.1 linux软件管理 : debian 体系的软件管理 :apt-get (Advanced Packaging Tools高级包装工具)
常用命令
sudo apt-get update -y
sudo apt-get install -y
sudo apt-get install package --reinstall ##重新安装包
sudo apt-get remove -y
sudo apt-get remove package --purge ## 删除包,包括配置文件等
sudo apt-get download -y
命令详解
Commands:
update - Retrieve new lists of packages 获取新的package的list
upgrade - Perform an upgrade 执行升级
install - Install new packages (pkg is libc6 not libc6.deb) 安装新package
remove - Remove packages 移除package
autoremove - Remove automatically all unused packages 自动移除不用的package
purge - Remove packages and config files 移除package和配置文件
source - Download source archives 下载源码存档
build-dep - Configure build-dependencies for source packages
dist-upgrade - Distribution upgrade, see apt-get(8)
dselect-upgrade - Follow dselect selections
clean - Erase downloaded archive files 抹去下载的存档文件
autoclean - Erase old downloaded archive files 抹去old下载的存档文件
check - Verify that there are no broken dependencies 验证有没有损坏的依赖
changelog - Download and display the changelog for the given package 对给定的package,下载并且展示changelog
download - Download the binary package into the current directory 下载二进制package到当前文件夹
Options:
-h This help text. 这个帮助text
-q Loggable output - no progress indicator
-qq No output except for errors
-d Download only - do NOT install or unpack archives 仅下载,不安装和解压归档文件
-s No-act. Perform ordering simulation(模拟) 不实际安装,模拟执行
-y Assume Yes to all queries and do not prompt(提示) 接收所有的询问,不提示
-f Attempt to correct a system with broken dependencies in place 尝试修复系统,使用损坏的依赖
-m Attempt to continue if archives are unlocatable 尝试继续,如果归档无法定位
-u Show a list of upgraded packages as well 同时显示更新的软件包list
-b Build the source package after fetching it 获取源码package后,在得到它之后
-V Show verbose(冗长的) version numbers 展示完整的版本号码
-c=? Read this configuration file
-o=? Set an arbitrary(任意的) configuration option, eg -o dir::cache=/tmp 设置自定义的配置选项,比如-o dir::cache=/tmp
本文详细介绍了Debian体系中APT-get的常用命令及其用法,包括更新软件列表、安装新软件包、重新安装包、移除软件包及配置文件等操作。适合于Linux初学者及需要快速查阅APT命令的用户。

被折叠的 条评论
为什么被折叠?



