4

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...

1 Answer 1

4

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.

1
  • Thank you, that was exactly the problem. Running chsh showed that sh was set as the default.
    – Choy
    Oct 8, 2012 at 1:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .