top (table of processes) package on Ubuntu 16.04 LTS [duplicate]
When I run sudo apt install top
, I get E: Unable to locate package top
I searched packages.ubuntu.com for top package on 32 bit Ubuntu 16.04 LTS, but there is none.
I wonder if it's correct or I'm missing something.
Solution 1:
It is probably installed with the procps
package. It is also common in all *NIX OSes. If you really need to find what it is installed with, install apt-file
first:
sudo apt install apt-file && apt-file update
If you run a which
command it will return the folder that it is installed into:
$ which top
/usr/bin/top
Then do a search like this:
apt-file search --regexp '/top$'
It will return a list like this:
broctl: /usr/share/broctl/scripts/helpers/top
crossfire-maps: /usr/share/games/crossfire/maps/santo_dominion/magara/well/top
crossfire-maps-small: /usr/share/games/crossfire/maps/santo_dominion/magara/well/top
liece: /usr/share/emacs/site-lisp/liece/styles/top
lubuntu-extra-sessions: /usr/share/lxpanel/profile/Lubuntu-Nexus7/panels/top
lxpanel: /etc/xdg/lxpanel/two_panels/panels/top
procps: /usr/bin/top
quilt: /usr/share/quilt/top
trn4: /usr/share/doc/trn4/examples/univ/top
trn4: /usr/share/trn4/HelpFiles/top
Then all you have to do is match the folder, and that is the package at the beginning of the line.
Or, you could combine the statement as one and it should return a more exact result:
$ apt-file search --regexp "^$(which top)$"
procps: /usr/bin/top
Hope this helps!
Solution 2:
If you are using http://packages.ubuntu.com/ to find packages that provide top
, you need to search for top
in the "Search the contents of packages" section. The results of such a search are:
File Packages
/etc/xdg/lxpanel/two_panels/panels/top lxpanel
/usr/bin/top procps
/usr/share/broctl/scripts/helpers/top broctl
/usr/share/doc/trn4/examples/univ/top trn4
/usr/share/emacs/site-lisp/liece/styles/top liece
/usr/share/games/crossfire/maps/santo_dominion/magara/well/top crossfire-maps, crossfire-maps-small
/usr/share/lxpanel/profile/Lubuntu-Nexus7/panels/top lubuntu-extra-sessions
/usr/share/quilt/top quilt
/usr/share/trn4/HelpFiles/top trn4
In your case, you are most likely looking for the package that provides /usr/bin/top
, which is procps
.
Unsurprisingly, the search results are identical to the ones found using apt-file
as mentioned in @Terrance's answer.