apt install
manpage
執行
$ man apt
可以找到一段說明
install, remove, purge (apt-get(8))
Performs the requested action on one or more packages specified via regex(7), glob(7) or exact match. The
requested action can be overridden for specific packages by append a plus (+) to the package name to
install this package or a minus (-) to remove it.
A specific version of a package can be selected for installation by following the package name with an
equals (=) and the version of the package to select. Alternatively the version from a specific release can
be selected by following the package name with a forward slash (/) and codename (jessie, stretch, sid ...)
or suite name (stable, testing, unstable). This will also select versions from this release for
dependencies of this package if needed to satisfy the request.
Removing a package removes all packaged data, but leaves usually small (modified) user configuration files
behind, in case the remove was an accident. Just issuing an installation request for the accidentally
removed package will restore its function as before in that case. On the other hand you can get rid of
these leftovers by calling purge even on already removed packages. Note that this does not affect any data
or configuration stored in your home directory.
help
執行
$ apt -h
可以找到一段說明
install - install packages
指令範例
執行
$ sudo apt install hello
就會安裝「hello」這個套件。
執行
$ dpkg -l hello
就看到
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-========================-=================-=================-======================================================
ii hello 2.10-1 amd64 example package based on GNU hello
或是執行
$ dpkg --get-selections | grep hello
就會看到
hello install
或是執行
$ dpkg -s hello | grep Status:
就會看到
Status: install ok installed
執行
$ dpkg -L hello
就會看到
/.
/usr
/usr/share
/usr/share/man
/usr/share/man/man1
/usr/share/man/man1/hello.1.gz
/usr/share/info
/usr/share/info/hello.info.gz
/usr/share/doc
/usr/share/doc/hello
/usr/share/doc/hello/copyright
/usr/share/doc/hello/NEWS.gz
/usr/share/doc/hello/changelog.Debian.gz
/usr/bin
/usr/bin/hello