Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

The path of my .basrc file is


It is weird that my file has nothing but the path I set. I think I am using a file at the wrong location or that I have lost my .bashrc file as none of the environment variables set here seem to work.

export PATH
export PATH
export PATH

export M2_HOME
export M2

I was prompted to install maven2 in order to use mvn, but the android command cannot be found. Could you please help me find a solution to this issue.


Meanwhile,I tried this:

export PATH=${PATH}:/opt/android-sdk-linux/platform-tools
export PATH=${PATH}:/opt/android-sdk-linux/tools

Now,the output of $PATH echoes:

bash: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/opt/android-sdk-linux/platform-tools:/opt/android-sdk-linux/build-tools: No such file or directory

2. Removed space between = $PATH
3. Ran echo $PATH
4. Logged out and logged back in
5. Opened the terminal and tried android list targets

share|improve this question
What are you trying to do? If "vamsi"is your username, .bashrc is in right place. – khajvah Oct 27 '13 at 14:18
what does echo $PATH give you? – jbat100 Oct 27 '13 at 14:19
What has android do with your computer? Explain your problem – khajvah Oct 27 '13 at 14:19
I would like to add the Android sdk path to my environment variables in linux as I would like to try developing apps with ant and the sdk using a text editor of my choice. – vamsiampolu Oct 27 '13 at 14:52
Your .bashrc is almost fine, there is one error, there should be no space between PATH= $PATH, change that to PATH=$PATH. To check if an environment variable has been set, run echo $PATH, not $PATH by itself. Now, what exactly do you want to add to your path and what makes you think it is not working? – terdon Oct 27 '13 at 15:32

1 Answer 1

up vote 1 down vote accepted

You haven't defined $ANDROID_SDK_HOME in the code you pasted. You only defined $ANDROID_HOME

edited to reflect terdon's comment.

share|improve this answer
+1 for ANDROID_SDK_HOME but the error is because the OP ran $PATH not echo $PATH, it does not mean the directory does not exist. – terdon Oct 27 '13 at 16:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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