Editing 2022.04.26 installation list
This commit is contained in:
parent
ed912eaae8
commit
7015ab59f1
@ -487,6 +487,134 @@ And that's it. Just about anything you type often on the command line can be tur
|
|||||||
|
|
||||||
\chapter{What Have I Installed?}
|
\chapter{What Have I Installed?}
|
||||||
|
|
||||||
|
I've mentioned the Unix Principle before: each application should do one thing and do it really well. The advantage to this principle for end users is that you don't need to worry about installing (or even paying for) a huge app that does a million things when you only need it for doing one. The advantage for developers is that you don't \textit{need}\footnote{Although there will always be those people who get your app for free and then complain that it \textit{doesn't} do everything. Hey bub, Swiss army knives are two aisles over and come with a price tag.} to develop an app that does everything, so you can keep a laser-like focus on making an app that works really well.
|
||||||
|
|
||||||
|
The downside is that you are likely to install a lot of apps as a result. This is ordinarily not a problem, unless you are going to migrate to a new machine or are swapping out an HDD for an SSD, which is where I found myself in 2020 when Ubuntu 20.04 came out, and I decided to install a new SSD in my 2013 Asus laptop, replacing the 300 GB HDD it came with. Of course, I could simply clone the old HDD onto my new SSD and then swap them out and upgrade, but for reasons that are long, complicated, and very likely boring, I decided this would be as good a time as any to just start with a clean slate.
|
||||||
|
|
||||||
|
Again, normally this is not an issue. But I have a Behringer C-1U microphone that I use for podcasting, and it only works on Ubuntu if I have a particular piece of software installed. For the life of me I could not remember what it was, but it was installed on this laptop, so it ought to be easy to find.
|
||||||
|
|
||||||
|
For what it's worth, any software package you install that has a graphical user interface will appear in your applications menu. (On Ubuntu, it's the "Show Applications" button in the lower left corner of your main screen.) But a lot of apps don't have a GUI—they're meant to be used from the command line. There isn't a graphical way to see a list of those. So we're off to the command line.
|
||||||
|
|
||||||
|
\textbf{Note:} What I'm describing in this section applies to Ubuntu and it's derivatives, since that's what I use and and most familiar with. Other flavors of Linux will probably have similar ways of doing what I'm going to talk about here.
|
||||||
|
|
||||||
|
\section{apt}
|
||||||
|
|
||||||
|
Here's the command:
|
||||||
|
|
||||||
|
\begin{verbatim}
|
||||||
|
$ apt list --installed
|
||||||
|
\end{verbatim}
|
||||||
|
|
||||||
|
When I ran this on my newly upgraded version of Ubuntu 22.04 (Jammy Jellyfish) its output ran to 2,811 lines, starting with
|
||||||
|
|
||||||
|
\begin{footnotesize}
|
||||||
|
\begin{Verbatim}
|
||||||
|
accountsservice/jammy,now 22.07.5-2ubuntu1 amd64 [installed,automatic]
|
||||||
|
acl/jammy,now 2.3.1-1 amd64 [installed,automatic]
|
||||||
|
acpi-support/jammy,now 0.144 amd64 [installed,automatic]
|
||||||
|
acpid/jammy,now 1:2.0.33-1ubuntu1 amd64 [installed,automatic]
|
||||||
|
adduser/jammy,jammy,now 3.118ubuntu5 all [installed,automatic]
|
||||||
|
\end{Verbatim}
|
||||||
|
\end{footnotesize}
|
||||||
|
|
||||||
|
and ending with
|
||||||
|
|
||||||
|
\begin{footnotesize}
|
||||||
|
\begin{Verbatim}
|
||||||
|
zim/jammy,jammy,now 0.74.3-1 all [installed]
|
||||||
|
zip/jammy,now 3.0-12build2 amd64 [installed,automatic]
|
||||||
|
zlib1g-dev/jammy,now 1:1.2.11.dfsg-2ubuntu9 amd64 [installed,automatic]
|
||||||
|
zlib1g/jammy,now 1:1.2.11.dfsg-2ubuntu9 amd64 [installed,automatic]
|
||||||
|
zstd/jammy,now 1.4.8+dfsg-3build1 amd64 [installed,automatic]
|
||||||
|
\end{Verbatim}
|
||||||
|
\end{footnotesize}
|
||||||
|
|
||||||
|
So what's happening here? Let's take a look at the relevant part of the \texttt{man apt} file:
|
||||||
|
|
||||||
|
\begin{small}
|
||||||
|
\begin{quote}
|
||||||
|
list is somewhat similar to dpkg-query --list in that it can display a list of packages satisfying certain criteria. It supports glob(7) patterns for matching package names as well as options to list installed (--installed), upgradeable (--upgradeable) or all available (--all-versions) versions.
|
||||||
|
\end{quote}
|
||||||
|
\end{small}
|
||||||
|
|
||||||
|
This command is giving us a lot of output because it's showing \textit{everything} that was installed using the \texttt{apt} command. You might think that you haven't really installed that much stuff, but \texttt{sudo apt install} will sometimes install additional software needed to make the software you are actually interested in run. If you ever install something using \texttt{apt} and see a message like ``The following additional packages will be installed:'' those additional packages will appear when you use this command.
|
||||||
|
|
||||||
|
If you want to check to see whether a particular app is installed, you can pipe the output to grep and let it do the work. For example, let's see if I have ghostscript installed:
|
||||||
|
|
||||||
|
\begin{verbatim}
|
||||||
|
$ apt list --installed | grep ghostscript
|
||||||
|
\end{verbatim}
|
||||||
|
|
||||||
|
and because I do, I get this output:
|
||||||
|
|
||||||
|
\begin{verbatim}
|
||||||
|
ghostscript-x/jammy,now 9.55.0~dfsg1-0ubuntu5 amd64 [installe
|
||||||
|
d,automatic]
|
||||||
|
ghostscript/jammy,now 9.55.0~dfsg1-0ubuntu5 amd64 [installed,
|
||||||
|
automatic]
|
||||||
|
\end{verbatim}
|
||||||
|
|
||||||
|
\section{dpkg}
|
||||||
|
|
||||||
|
If you want something a bit more tabular, you can always run
|
||||||
|
|
||||||
|
\begin{verbatim}
|
||||||
|
$ dpkg-query -l | less
|
||||||
|
\end{verbatim}
|
||||||
|
|
||||||
|
You will get a nice, very \textit{wide} table that shows you a list of all installed packages, their version, their architecture (amd64 and whatnot), and a short description. Unfortunatley, the output is again huge. Outputting this to a text file again produced 2,971 lines.
|
||||||
|
|
||||||
|
That short description is pretty handy however when you're rooting around in the \texttt{bin} folder and wondering what things do, actually. If you want to find out what a particular package does, you can again pipe its name to \texttt{grep}:
|
||||||
|
|
||||||
|
\begin{verbatim}
|
||||||
|
$ dpkg-query -l | grep ghostscript
|
||||||
|
\end{verbatim}
|
||||||
|
|
||||||
|
which gives us this:
|
||||||
|
|
||||||
|
\begin{footnotesize}
|
||||||
|
\begin{verbatim}
|
||||||
|
ii ghostscript 9.55.0~dfsg1-0ubuntu5 amd64 interpreter for the
|
||||||
|
PostScript language and for PDF
|
||||||
|
|
||||||
|
ii ghostscript-x 9.55.0~dfsg1-0ubuntu5 amd64 interpreter for the
|
||||||
|
PostScript language and for PDF - X11 support
|
||||||
|
\end{verbatim}
|
||||||
|
\end{footnotesize}
|
||||||
|
|
||||||
|
I don't find this very useful however, because again, that is formatted in a far wider table than most terminal windows (I took out a lot of extra space, and still had to wrap things onto a second line), and honestly, if you want to know what an app does, it's probably easier to just look it up on the web.
|
||||||
|
|
||||||
|
\section{snap}
|
||||||
|
|
||||||
|
If you use snap packages (which are controversial in some quarters), you can always see what you've installed by using this command:
|
||||||
|
|
||||||
|
\begin{verbatim}
|
||||||
|
$ snap list
|
||||||
|
\end{verbatim}
|
||||||
|
|
||||||
|
This is again displayed in a pretty wide table, but it also gives you the Version, the Revision, the Tracking status (``latest/stable'' in most cases), the Publisher (Canonical, Mozilla, etc), and Notes.
|
||||||
|
|
||||||
|
\section{flatpak}
|
||||||
|
|
||||||
|
If you use flatpak to install software, the command is similar to snap:
|
||||||
|
|
||||||
|
\begin{verbatim}
|
||||||
|
$flatpak list
|
||||||
|
\end{verbatim}
|
||||||
|
|
||||||
|
\section{The Real Issue}
|
||||||
|
|
||||||
|
The real problem with all of these approaches is that none of them do a very good job of telling what you actually want to know: which software packages did \textit{I} deliberately install?
|
||||||
|
|
||||||
|
In fact, I found a page on StackExchange\footnote{\href{https://askubuntu.com/questions/17823/how-to-list-all-installed-packages}{\texttt{https://askubuntu.com/questions/17823/how-to-list-all-installed-packages}}} that was first asked in December 2010 and was last modified in March 2022, has 24 answers, has been viewed 4.6 million times. Even something as simple as
|
||||||
|
|
||||||
|
\begin{verbatim}
|
||||||
|
$ apt-mark showmanual
|
||||||
|
\end{verbatim}
|
||||||
|
|
||||||
|
\textit{still} shows a lot of software packages that I \texttt{techically} installed myself when I upgrade my system software.
|
||||||
|
|
||||||
|
|
||||||
\chapter{What's to Like About Linux?}
|
\chapter{What's to Like About Linux?}
|
||||||
|
|
||||||
% \includegraphics[scale=0.23]{Unix_timeline_en}\footnote{From \href{https://commons.wikimedia.org/wiki/File:Unix\_timeline.en.png}{\texttt{https://commons.wikimedia.org/wiki/File:Unix\_timeline.en.png}}}
|
% \includegraphics[scale=0.23]{Unix_timeline_en}\footnote{From \href{https://commons.wikimedia.org/wiki/File:Unix\_timeline.en.png}{\texttt{https://commons.wikimedia.org/wiki/File:Unix\_timeline.en.png}}}
|
||||||
|
Loading…
Reference in New Issue
Block a user