Linux Basics: which command

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:

which ls

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.

1 Comment

  1. Interestingly enough, it had been a long time since I needed to create a device file. However, just recently I had an interesting situation where one of the device files I typically use was not created and I did have to create it. I have not had any problem with that device since. So a situation caused by a missing device file can still happen and knowing how to deal with it can be important.

Leave a Reply

Your email address will not be published.