I have a VPS from Linode. I deployed Ubuntu 10.04 server. I added a user and put it sudoers file. when I write as a user
apti <TAB>
it comletes with tab to
aptitude <TAB>
but when I continue to
aptitude upd <TAB>
it didnt complete but on my desktop it works great. Even worse if I try same command with sudo
sudo apti <TAB>
does not work I checked .basrc, .profile/.bashrc and /etc/bash.basrc files and none of them were commented out so what is wrong. By the way when I root it works
mine ~/bashrc
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
. /etc/bash_completion
fi
When I got my Linode (Jaunty) I had to install
bash-completion
. Give that a go.You should have something like this in your
~/.bashrc
:What do you mean "they are all commented out"? It's possible that something you need is commented out and that's causing your problem.
You may also want to add the line "complete -cf sudo" to your ~/.bashrc file. This will allow bash to search for commands after sudo rather than searching for files in the current directory. I do the same with a lot of other commands too such as man and which.
Check you don't have commented these lines out
once in your
~/.bashrc
file (probably ok) and once in the/root/.bashrc
file where it is from unknown reasons commented out.