Occasionally you’ll need to figure out where a specific application is located on your system. To do this you can use the which command. For example let’s say we wanted to find out where the ls command is installed on the system. Just open a terminal and run:
On my system this prints out the following:
It’s as simple as that! Now I know that when I run the ls command it’s really running the program located under my /bin directory.