~/which(1) en

WHICH(1)General Commands ManualWHICH(1)

NAME

which - say which file a command is

SYNOPSIS

which name ...

DESCRIPTION

Looks along $PATH for the name and prints the file it found, which here is in /run/current-system/sw/bin. Nothing found is an exit status of 1 and a line saying where it looked.

It only knows about files, so which cd is a disappointment: cd is the shell’s own and has no file. type is the command that knows the difference.

EXAMPLES

which ls

which nix

SEE ALSO

type(1), sh(1), hier(7)

tilenkoren.com2026WHICH(1)