The direct answer is procps
. Here is how you can find this out for yourself:
# Install apt-file, which allows you to search
# for the package containing a file
sudo apt-get install apt-file
# Update the package/file mapping database
sudo apt-file update
# Search for "top" at the end of a path
apt-file search --regexp '/top$'
The output of the final command should look something like this:
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
lxpanel: /usr/share/lxpanel/profile/two_panels/panels/top
procps: /usr/bin/top
quilt: /usr/share/quilt/top
You can see that only procps
provides an executable in your standard PATH, which gives a clue that it might be the right one. You can also find out more about procps
to make sure like it seems like the right one:
$ apt-cache show procps
Package: procps
Version: 1:3.3.3-3
[...]
Description-en: /proc file system utilities
This package provides command line and full screen utilities for browsing
procfs, a "pseudo" file system dynamically generated by the kernel to
provide information about the status of entries in its process table
(such as whether the process is running, stopped, or a "zombie").
.
It contains free, kill, pkill, pgrep, pmap, ps, pwdx, skill, slabtop,
snice, sysctl, tload, top, uptime, vmstat, w, and watch.
laps
when it isn't installed triggers the message "The program 'laps' is currently not installed. You can install it by typing:sudo apt-get install epix
". Can you add that functionality to your system? – GKFX Mar 23 '15 at 17:28In the following example the command
– ossbuntu Oct 26 '19 at 15:41dig
is being searched forapt show '*' | grep --regexp '[^A-Za-z]dig[^A-Za-z]' --before-context 30 --after-context 5 --color=always | less --raw-control-chars