Monday, June 7, 2021

What you can find out asking which, whereis and whatis in Linux

The which, whereis and whatis commands on a Linux system provide information about commands. They provide related but not identical information. In this post, we’ll check out the differences and provide a script for getting information that’s available from all three commands. We’ll also explore some sample commands for looking at secondary (i.e., not section 1) man pages.

which

The which command will show you the file-system location for a command’s executable. This is the file that is read and run whenever you type the command name.

$ which date
/usr/bin/date
$ which shutdown
/usr/sbin/shutdown

The which command will also report on your aliases and show you the commands they invoke.

To read this article in full, please click here


Thanks to Sandra Henry-Stocker (see source)

No comments:

Post a Comment