0

Why is it that some bash programs will only run on my system when I type ./ before their name?

An example: In my [...]/android/sdk folders I have to execute adb like this:

./adb devices

Why not just adb devices?

marked as duplicate by Ramesh, Ulrich Dangel, slm Jul 2 '14 at 1:32

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

0

If you run

echo $PATH

you will see a list of directories that your system will search for commands to run.

If you want to run commands in your current working directory, then you can run:

PATH=$PATH:.;export PATH

You can add this line to your ~/.bash_profile to have this behaviour persistent across sessions.

0

. is the symbol for your current directory. You have to include the / so it knows that it's not a . at the beginning of the file. If you navigate to a different directory and type the directory of the file, you don't have to have the ./

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