Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was trying to make my Ubuntu connect to nexus tab and used the following command lines:

echo "alias android-connect=\"mtpfs -o allow_other /media/GalaxyNexus\"" >> ~/.bashrc
echo "alias android-disconnect=\"fusermount -u /media/GalaxyNexus\"" >> ~/.bashrc
source ~/.bashrc

I got the following errors and every time I open my command line it's writt

bash: alias: -o: not found
bash: alias: allow_other: not found
bash: alias: /media/Nexus: not found
bash: alias: -u: not found
bash: alias: /media/Nexus: not found
bash: alias: source: not found
bash: alias: /home/user/.bashrc: not found

How can I handle that?

share|improve this question
Can you cat your .bashrc and paste the added lines here? – choroba May 24 '13 at 11:10
Something doesn't quite add up here - your alias has the path /media/GalaxyNexus, and yet the error message has /media/Nexus. But somehow it seems the double quotes must be missing from the line in .bashrc. Best way would be to manually edit it in gedit (or similar) rather than echoing to it, I'd say - that way you can make sure it's parsing correctly. – Jez W May 24 '13 at 11:14
up vote 2 down vote accepted

It seems your .bashrc file contains the lines without the double quotes:

alias android-connect=mtpfs -o allow_other /media/GalaxyNexus
alias android-disconnect=fusermount -u /media/GalaxyNexus

Open the file in an editor and remove the offending lines.

share|improve this answer
Or just quote them.... alias short="some commands" – demure May 24 '13 at 14:04

I had a similar problem due to a missing closing quote - ". The best way to figure out the problem is to open the file in a graphical editor which has syntax coloring. I did it using sublime text

share|improve this answer

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.