Ubuntu系统Tab键不能自动补全

情况描述:

①  虚拟机刚装的系统,apt-get install 命令 install 无法补全

②  killall  后面自定义的进程名称无法补全。

解决方法   :

①  打开shell 程序

        sudo gedit /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

③ 生效

source一下 /etc/bash.bashrc

你可能感兴趣的:(Linux,ubuntu,linux,运维)