apt-get install bash-completion
vim ~/.bashrc 在文件的最后一行加如下代码
if [ -f /etc/bash_completion ]; then . /etc/bash_completion fi
source ~/.bashrc