安装 bash-completion

sudo apt-get install bash-completion

~/.bashrc

# 在“.bashrc”中添加如下内容:

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

立即生效

source ~/.bashrc

Enjoy! “Tab” “Tab” “Tab” ……