Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

After a recent upgrade to 12.04, auto tab completion was disable in /etc/bash.bashrc. I uncommented the following lines:

if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
    . /etc/bash_completion
fi

I tried to then run source /etc/bash.bashrc and . /etc/bash.bashrc but neither reloaded the config. They just gave me the error -sh: 1: source: not found. Typing in simply bash did seem to work and enabled auto tab completion. However after logging out of the server and then logging back in, I find that auto tab completion is not working again and the only way to get it working is to type bash again.

Anyone know what I need to do to make this change permanent?

EDIT:

I just realized that when I initially ssh into the server, it just says $. After running the bash command, it then says username@machinename$. Not sure if this has anything to do with my problem or not...

share|improve this question

1 Answer 1

up vote 4 down vote accepted

source isn't an executable command, it's a bash builtin. It seems that your login shell isn't bash (it might be sh).

You can change your shell with

chsh

Enter /bin/bash there. You should be able to use source afterwards.

share|improve this answer
    
Thank you, that was exactly the problem. Running chsh showed that sh was set as the default. –  Choy Oct 8 '12 at 1:50

Your Answer

 
discard

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.