Debian

Under the hood, Debian uses the dpkg package manager to install and manage packages. There are also various frontends available, such as apt and aptitude, which make management more user friendly.

Starting with the basics, you can use dpkg-query to query installed packages on a system:

$ dpkg-query -Wadduser    3.115apt    1.4.8apt-listchanges    3.10apt-utils    1.4.8base-files    9.9+deb9u5base-passwd    3.5.43bash    4.4-5<SNIP>xauth    1:1.0.9-1+b2xdg-user-dirs    0.15-2+b1xkb-data    2.19-1+deb9u1xml-core    0.17xxd    2:8.0.0197-4+deb9u1xz-utils    5.2.2-1.2+b1zlib1g:amd64    1:1.2.8.dfsg-5

You'll no doubt notice that by default, the packages and versions are separated by a tab character. Personally, I think this is hideous (because two spaces are the superior option), ...

Get Linux Administration Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.