Showing posts with label How to find command location in Linux. Show all posts
Showing posts with label How to find command location in Linux. Show all posts

Wednesday, October 17

How to find command location in Linux


This is a small how to on finding your command location. Some times its required to find command location to use it as path is not set properly to /bin or /sbin or some other folder. And some times we install packages through scripts where the commands will be installed in a defined path other than /usr/bin or /usr/sbin etc.
command to check where the particular command is installed?
which command-name
Example:
which ls
Output:
root@surendra:/home/surendra# which ls
/bin/ls
root@surendra:/home/surendra#