Autocompletion doesn't work while logged as root

When you try autocomplete commands logged as super user with "sudo su" (to install software with apt-get for example), by default this option is unavailable. To enable the autocomplete for root user you need uncomment the last 3 lines in your /root/bash.bashrc file or add them if not exist.

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

Now, restart your bash:

$ bash --

Enjoy it!

Comments

Popular posts from this blog

from: can't read /var/mail/ in Python scripts

How to fix Android when developer options are not available for this user

Fix "Set scan parameters failed: Input/output error" on Ubuntu 16.04