The linux bash shell has great auto-completion of stuff like file names and commands. You can invoke it anytime while typing the start of a command by pressing TAB.
But some stuff dies not get auto-completed, e.g., command parameters or package names when using apt-get. You can turn advanced bash completion on to enable this. First ensure that the bash-completion package is installed:
# for SuSE:
sudo zypper in bash-completion
# for Debian-based distros like Ubuntu:
sudo apt-get install bash-completion
Find lines like the following ones in /etc/bash.bashrc or your personal version ~/.bashrc and remove the comment symbols (#) at the start of each line:
# 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
These lines check for the existence of the bash_completion file, and if it is found, it is loaded (this is done by the point).
Next time you log in, bash-completion will be auto-loaded. To load it now for your current session, you can just do this:
# as your user