17

Many of the common utilities in Linux either come packaged in util-linux from Linux Foundation or coreutils from GNU. The man page for top doesn't specify anything.

I am using CentOS.

0

2 Answers 2

16

The "top" utility is in the "procps" package on RHEL/CentOS systems.

16

You can do yum whatprovides <path> to see what package provides a file. For example, yum whatprovides /usr/bin/top will tell you for top or yum whatprovides '*/top' if you weren't sure of the path.

6
  • 4
    @Satanicpuppy: Who doesn't have procps installed. Anyway, yum whatprovides '*/top' also works if you don't know the path, as said.
    – Sven
    Apr 17, 2015 at 18:21
  • 3
    I'm not sure what having it installed has to do with it, you can still find out what package provides a file with that command, even if the file doesn't exist on your disk. It's how you would lookup what to install to get a file Apr 17, 2015 at 18:21
  • 3
    The last command need quoting or escaping to work reliably. Could be written as yum whatprovides "*/top", yum whatprovides '*'/top, yum whatprovides \*/top, or some other variation of it.
    – kasperd
    Apr 17, 2015 at 22:34
  • 4
    I know this question was tagged [centos] but just for reference: Pacman: pkgfile /usr/bin/top; Apt: apt-file search /usr/bin/top.
    – user267609
    Apr 18, 2015 at 4:36
  • 1
    this is rpm basic usage question "rpm -qf $(which top)"
    – c4f4t0r
    Apr 18, 2015 at 15:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .