I'm on 12.04 and I'm trying to find a way to enable Bash completion in root user.
Any ideas on how to do that?
|show 3 more comments|
Bash completion can be enabled in the file .bashrc as explained in this Q&A. In your case it seems to be correct in your user's .bashrc, but not in your root's .bashrc. The latter file is located in
You have to change the lines 98-100 from
Then close your terminals and reopen them.
I successfully enabled "bash completion" in Ubuntu 12.04 LTS by editing the file "bash.bash.rc" in "etc".
I just removed the "#" in lines 32-34 and bash completion for "sudo" works fine now.