Bash completion is a useful tool for completion of file paths, commands etc. By default it is enabled on Ubuntu but not on Debian. Chances are, if you have been using Ubuntu like me, you will dearly miss bash completion on Debian. With two simple steps it can also be enabled on Debian. This article was originally posted on How to Forge here. First we will need to install bash-completion with the following command.
sudo apt-get install bash-completion
Next you have two options. If you want to enable bash completion system wide then you will want to add the code below to the bottom of /etc/profile
. Otherwise, if you want to enable bash completion for a single user then you will want to add the code below to the bottom of.bashrc
file located in the users home directory.
if [ -f /etc/bash_completion ]; then . /etc/bash_completion fi