Bash Autocompletion for Root

Debian/Ubuntu do not have bash autocompletion enabled for  root account by default.  When working under root account, this is quite missed feature,   but luckily it can be enabled very easily:

cd ~
apt-get install bash-completion  # if not installed - like in minimal Debian install
nano .bashrc

add folowing to the file:

if [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
fi

Leave a Reply

Your email address will not be published. Required fields are marked *