很多人都总结过这个,最近我也在学习总结下。
root@ubuntu:~# apt-
apt-cache apt-config apt-ftparchive apt-key apt-sortpkgs
apt-cdrom apt-extracttemplates apt-get apt-mark
apt 命令的引入就是为了解决命令过于分散的问题,它包括了 apt-get 命令出现以来使用最广泛的功能选项,以及 apt-cache 和 apt-config 命令中很少用到的功能。
在使用 apt 命令时,用户不必再由 apt-get 转到 apt-cache 或 apt-config,而且 apt 更加结构化,并为用户提供了管理软件包所需的必要选项。
简单来说就是:apt = apt-get、apt-cache 和 apt-config 中最常用命令选项的集合。
root@ubuntu:~# apt-cache --help
apt 1.6.14 (amd64)
Usage: apt-cache [options] command
apt-cache [options] show pkg1 [pkg2 ...]
Most used commands:
showsrc - Show source records
search - Search the package list for a regex pattern
depends - Show raw dependency information for a package
rdepends - Show reverse dependency information for a package
show - Show a readable record for the package
pkgnames - List the names of all packages in the system
policy - Show policy settings
root@ubuntu:~# apt-get --help
apt 1.6.14 (amd64)
Usage: apt-get [options] command
apt-get [options] install|remove pkg1 [pkg2 ...]
apt-get [options] source pkg1 [pkg2 ...]
Most used commands:
update - Retrieve new lists of packages
upgrade - Perform an upgrade
install - Install new packages (pkg is libc6 not libc6.deb)
remove - Remove packages
purge - Remove packages and config files
autoremove - Remove automatically all unused packages
dist-upgrade - Distribution upgrade, see apt-get(8)
dselect-upgrade - Follow dselect selections
build-dep - Configure build-dependencies for source packages
clean - Erase downloaded archive files
autoclean - Erase old downloaded archive files
check - Verify that there are no broken dependencies
source - Download source archives
download - Download the binary package into the current directory
changelog - Download and display the changelog for the given package
root@ubuntu:~# apt-config --help
apt 1.6.14 (amd64)
Usage: apt-config [options] command
apt-config is an interface to the configuration settings used by
all APT tools, mainly intended for debugging and shell scripting.
Most used commands:
shell - get configuration values via shell evaluation
dump - show the active configuration setting