~/which(1)
en
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