Debian GNU/Linux Reference Card
-
Upload
paulpuscasu -
Category
Documents
-
view
222 -
download
0
Transcript of Debian GNU/Linux Reference Card
-
7/30/2019 Debian GNU/Linux Reference Card
1/2
Dpkgdpkg --compare-versions v1 gtv2
Compare version numbers,check with echo $?.
dpkg-query -W --showformat=format
Query installed packages,format e.g. '${Package}${Version}${Installed-Size}\n'.
dpkg --get-selections >file
Write package selections tofile.
dpkg --set-selections file Overwrite file with output ofcommand.
command >> fileAppend output of commandto file.
cmd1 | cmd2Use output of command 1 asinput of command 2.
command < fileUse file as input forcommand.
APT
apt-get update
Update packages listingsfrom package repositories
as listed in/etc/apt/sources.list.Required whenever that fileor the contents of therepositories change.
apt-cache searchsearch-string
Search packages anddescriptions for search-string.
apt-cache policypackage-names
Show versions and prioritiesof available packages.
apt-cache showpackage-names
Show package informationincl. description.
APTapt-cacheshowpkg package-names
Show packagedependencies (neededpackages).
apt-get installpackage-names
Install packages fromrepositories with alldependencies.
apt-get upgradeInstall newest versions of allpackages currentlyinstalled.
apt-get
dist-upgrade
Like apt-get upgrade, butwith advanced conflict
resolution.apt-get removepackage-names
Remove packages with allneeded packages.
apt-getautoremove
Remove packages that noother packages depend on.
apt-cache dependspackage-names
List all packages needed bythe one given.
apt-cacherdependspackage-names
List all packages that needthe one given.
apt-file updateUpdate content listingsfrom package repositories,see apt-get update
apt-file searchfile-name
Search packages for file.
apt-file listpackage-name
List contents of a package.
auto-apt
Installs packagesautomatically if needed, canreplace apt-file, needsauto-apt.
aptitudeConsole interface to APT,needs aptitude.
synapticGUI interface to APT, needssynaptic.
Dpkgdpkg -l [names] List packages.dpkg -I pkg.deb Show package information.dpkg -c pkg.deb List contents of package file.
dpkg -S filenameShow which package a filebelongs to.
dpkg -i pkg.deb Install package files.
debsumsAudit check sums ofinstalled packages, needsdebsums.
dpkg-divert[options] file
Override a package'sversion of a file.