Linux sudo自动补全

编辑文件 /etc/bash.bashrc

# enable bash completion in interactive shells 
#if [ -f /etc/bash_completion ] && ! shopt -oq posix; then 
# . /etc/bash_completion 
#fi

去掉注释

# enable bash completion in interactive shells 
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then 
 . /etc/bash_completion 
fi

你可能感兴趣的:(Linux sudo自动补全)