Kali xfce4终端不能用TAB自动补全

1、用编辑器打开 /etc/bash.bashrc文件

2、找到文件中的下列代码

#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

将注释符号#去掉,即改成

#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即可, 即

source /etc/bash.bashrc

转载于:https://www.cnblogs.com/bonelee/p/8794243.html

**

第二方法:

**
1.安装命令补全:

apt-get install bash-completion

2.在 /etc/profile 里加

if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi

3.刷新/etc/profile配置文件,使其生效

source /etc/profile

转载于

https://www.yangshengliang.com/kaiyuan-shijie/linux-shijie/452.html

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值