CentOS7命令补全的一个小技巧

1、场景介绍

不少系统管理员倾向于使用CentOS6下的/etc/init.d的服务管理方式对服务进行管理,而不太习惯CentOS7下的systemctl方式对服务进行管理,他们以为CentOS7下的systemctl的命令补全功能不太完善,其实这是一个“误会”,由于如今安装操做系统的时候,选用的模板每每是最小化安装,最小化安装的状况下,命令补全的包是没有安装上去的,咱们经过如下几个命令,就能很快的定位和解决问题。java

2、处理方法

# 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

到此,问题获得解决。centos

相关文章
相关标签/搜索