ubuntu怎样实现自动补齐
ubuntu实现自动补齐的方法:
1.以root权限利用vi编辑器打开/etc/bash.bashrc文件,命令:
sudovi/etc/bash.bashrc
2.找到/etc/bash.bashrc文件中的以下代码进行修改。
#enable bash completion in interactive shells
# 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
需要去掉去掉 if 到 fi 之间的注释 # 号,例如:
#enable bash completion in interactive shells
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.最后刷新保存一下便可,命令:
source /etc/bash.bashrc
本文来源:https://www.yuntue.com/post/76924.html | 云服务器网,转载请注明出处!

微信扫一扫打赏
支付宝扫一扫打赏