which

Find where a command's binary lives

which shows the full path of the executable that would run when you type a command. Use when debugging why the wrong version of a tool is running.

Example

$ which nginx
/usr/sbin/nginx
Tip: Type it yourself in the terminal below - reading is not the same as doing.