Enabling Bash Autocompletion in LXCs

Bash autocompletion is disabled inside LXCs by default. This is how to enable it.

Open the file /etc/bash.bashrc and uncomment the following lines, except the first one.

# enable bash completion in interactive shells
#if ! shopt -oq posix; then
#  if [ -f /usr/share/bash-completion/bash_completion ]; then
#    . /usr/share/bash-completion/bash_completion
#  elif [ -f /etc/bash_completion ]; then
#    . /etc/bash_completion
#  fi
#fi

Leave a Reply