1、su切换到root账号,安装bash-completion
apt install bash-completion
2、切换到非root账号,打开.bashrc找到以下内容并复制
# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
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
fi
fi
3、将复制的内容粘贴到root用的.bashrc
4、. .bashrc,重新加载bash
417



被折叠的 条评论
为什么被折叠?



