解决debian 终端命令行无法自动补全

By | 2020年12月12日

作者: 杨圣亮 分类: Linux技巧 发布时间: 2016-11-16 11:30:16

安装了debian,在终端输入一半命令行再按 <TAB>后,却没有实现自动补全功能。几经搜索,在一篇老外的无政府主义里得到了解决方案:

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

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注