一:下载bash-competion工具
二:解压
unzip bash-completion-20060301-1.el6.rf.noarch.rpm.zip
mv bash-completion-master /usr/share/bash-completion
三:编辑./bashrc文件
vim ./bashrc 在某行输入
[[ $PS1 && -f /usr/share/bash-completion/bash_completion ]] &&
./usr/share/bash-completion/bash-completion
即可