How can I find where a program is running from? I tried using which gclone but it didn't show anything. For example, I want the command to return the location of the script or command.

  • The command is correct, the name of the program probably not. What software is that? – user589808 Jan 21 '17 at 3:07
  • If script or command resides in any folders that are listed in PATH variable ( do echo $PATH ) , then it will show up in output of which command. Otherwise, it won't and you have to find other ways. Also, shell built-in commands don't show up – Sergiy Kolodyazhnyy Jan 21 '17 at 5:27
whereis gclone

or run gclone and do:

find . -perm /u+x -type f

to find it. the second command will find all the executables.


I assume "gclone" is a script that you made ? The "which" command only shows programs or scripts that are in the PATH. You could copy your script in /usr/local/bin/ and then try again (Note that /usr/local/bin/ can be read by all users on that computer). Can you try that ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.