一、场景介绍
很多系统管理员倾向于使用CentOS6下的/etc/init.d的服务管理方式对服务进行管理,而不太习惯CentOS7下的systemctl方式对服务进行管理,他们觉得CentOS7下的systemctl的命令补全功能不太完善,其实这是一个“误会”,因为现在安装操作系统的时候,选用的模板往往是最小化安装,最小化安装的情况下,命令补全的包是没有安装上去的,我们通过以下几个命令,就能很快的定位和解决问题。
二、处理方法
# yum -y install bash-completion
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package bash-completion.noarch 1:2.1-6.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
===================================================================================
Package Arch Version Repository Size
===================================================================================
Installing:
bash-completion noarch 1:2.1-6.el7 local-centosbase7 85 k
Transaction Summary
===================================================================================
Install 1 Package
Total download size: 85 k
Installed size: 259 k
Downloading packages:
bash-completion-2.1-6.el7.noarch.rpm | 85 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : 1:bash-completion-2.1-6.el7.noarch 1/1
Verifying : 1:bash-completion-2.1-6.el7.noarch 1/1
Installed:
bash-completion.noarch 1:2.1-6.el7
Complete!
# systemctl start zabbix-java-gateway.service (这里包含有tab键)
Display all 167 possibilities? (y or n)^C
到此,问题得到解决。
转载于:https://blog.51cto.com/molewan/2109390