Name

hash

Synopsis

hash [-r] [commands]

Description

Search for commands and remember the directory in which each command resides. Hashing causes the shell to remember the association between a “name” and the absolute pathname of an executable, so that future executions don’t require a search of PATH. With no arguments, hash lists the current hashed commands. The display shows hits (the number of times the command is called by the shell) and command (the full pathname).

Get Linux in a Nutshell, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.