1.方案一
- 查看bash-completion包有没有安装
- rpm -qa | grep bash-completion
安装软件
- yum -y install bash-completion 或者 yum -y install bash*
- 重启reboot
方案二
1,查看版本
[root@TestServer /]# cat etc/redhat-release
CentOS Linux release 7.7.1908 (Core)
2,首先安装epel
yum install -y epel-release
3,安装 bash-completion, bash-completion-extras
yum install -y bash-completion bash-completion-extras
4,查看bash_completion.sh
find / -name bash_completion.sh
[root@TestServer /]# find / -name bash_completion.sh
/etc/profile.d/bash_completion.sh
5,执行
source /etc/profile
6,使用tab 可以补全命令,双击查看可执行的命令。
[root@TestServer profile.d]# systemctl st
start status stop