The option that allows the which command to display all occurrences of a matching command is -a.
You can use it like this:
which -a command_name
This will list all the paths where the specified command is found in your PATH environment variable.
