现在的位置: 首页 > 综合 > 正文

ubuntu中使用tab键来补齐输入命令普通用户可用切换root后不能的解决方法

2013年05月29日 ⁄ 综合 ⁄ 共 330字 ⁄ 字号 评论关闭

在终端输入即可,注意.和/之间的空格

. /etc/bash_completion

这样就可以了,但是重启又不行,找到root的配置文件修改即可

找到 /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 [ -f /etc/bash_completion ] && ! shopt -oq posix; then
. /etc/bash_completion
fi

注释掉如上即可,exit退出再来就可以了

抱歉!评论已关闭.