黑客对linux发展贡献是非常多的。Bash命令自动完成功能只不过是收集各种黑客指定参数是如何通过Readline使用内置完成来完成的。该功能在其他linux分支是启用的,如ubuntu、debian等等。然而,基于RHCE分支发布的linux版本却没有安装和启用,如CentOS。
如果你使用过ubuntu系统,bash命令自动补齐会觉得非常方便高效。再使用RHCE或CentOS的话,你肯定会吐槽一番的,“这bash是什么鬼东西,不能自动补齐。”文章源自运维生存时间-https://www.ttlsa.com/linux/rhel-centos-bash-command-automatically-function/
那么RHEL / CentOS 怎么启用bash命令自动补齐功能呢?请看下面文章源自运维生存时间-https://www.ttlsa.com/linux/rhel-centos-bash-command-automatically-function/
1. 安装文章源自运维生存时间-https://www.ttlsa.com/linux/rhel-centos-bash-command-automatically-function/
# yum install bash-completion
需要先安装EPEL源。文章源自运维生存时间-https://www.ttlsa.com/linux/rhel-centos-bash-command-automatically-function/
2. 使用文章源自运维生存时间-https://www.ttlsa.com/linux/rhel-centos-bash-command-automatically-function/
在使用前需要注销当前session。文章源自运维生存时间-https://www.ttlsa.com/linux/rhel-centos-bash-command-automatically-function/
# logout
或者载于bash_completion文件,方法如下:文章源自运维生存时间-https://www.ttlsa.com/linux/rhel-centos-bash-command-automatically-function/
# . /etc/bash_completion 或 # source /etc/bash_completion
有兴趣的话,可以去看看这个文件。文章源自运维生存时间-https://www.ttlsa.com/linux/rhel-centos-bash-command-automatically-function/
3. 举例文章源自运维生存时间-https://www.ttlsa.com/linux/rhel-centos-bash-command-automatically-function/
文章源自运维生存时间-https://www.ttlsa.com/linux/rhel-centos-bash-command-automatically-function/
文章源自运维生存时间-https://www.ttlsa.com/linux/rhel-centos-bash-command-automatically-function/
转载请注明来自运维生存时间:https://www.ttlsa.com/html/4103.html文章源自运维生存时间-https://www.ttlsa.com/linux/rhel-centos-bash-command-automatically-function/ 文章源自运维生存时间-https://www.ttlsa.com/linux/rhel-centos-bash-command-automatically-function/
2F
这个补全命令,直接按tab键也可以的啊~
B1
@ chenglee tab没那么全的,你试试就知道多强大了
1F
正在学linux,非常有帮助的功能,谢谢分享!