O'Reilly logo

A Practical Guide to Red Hat® Linux® 8 by Mark G. Sobell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Locating Commands

The whereis and apropos utilities help you find a command whose name you have forgotten or whose location you do not know. When there are multiple copies of a utility/program, which can tell you which copy you will run. GNU made a utility named locate more secure and renamed it slocate. This utility builds a compressed database that speeds up searches. Refer to the slocate man page.

tip || which versus whereis

Give it the name of a program you want to run, and which looks through the directories in your search path, in order, and locates the program. If more than one program with the name you specify is in your search path, which displays the name of only the first one (the one you will execute).

The whereis utility looks through ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required