針對Tab鍵不能使用解決辦法(Linux系統)


Tab鍵在裝Linux操作系統時,最小化安裝沒有安裝能使用Tab鍵的安裝包,Tab鍵就無法使用,但命令和本該有的目標也有。

這時就需要安裝bash-completion包.,廢話不多說,直接上!

一、針對最小化安裝修復TAB鍵的使用

1、查看是否安裝了bash-completion

[root@dnsserver2 ~]# rpm -qa | grep bash-*
bash-4.2.46-28.el7.x86_64

2、在本地yum倉庫查看是否有bash-completion包

[root@dnsserver2 ~]# yum info bash-*
已加載插件:product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
已安裝的軟件包
名稱    :bash
架構    :x86_64
版本    :4.2.46
發布    :28.el7
大小    :3.5 M
源    :installed
來自源:anaconda
簡介    : The GNU Bourne Again shell
網址    :http://www.gnu.org/software/bash
協議    : GPLv3+
描述    : The GNU Bourne Again shell (Bash) is a shell or command language
         : interpreter that is compatible with the Bourne shell (sh). Bash
         : incorporates useful features from the Korn shell (ksh) and the C shell
         : (csh). Most sh scripts can be run by bash without modification.

可安裝的軟件包
名稱    :bash-completion
架構    :noarch
時期       :1
版本    :2.1
發布    :6.el7
大小    :85 k
源    :dvd
簡介    : Programmable completion for Bash
網址    :http://bash-completion.alioth.debian.org/
協議    : GPLv2+
描述    : bash-completion is a collection of shell functions that take advantage
         : of the programmable completion feature of bash.

或者
[root@dnsserver2 ~]# yum list bash-*
已加載插件:product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
已安裝的軟件包
bash.x86_64                                                                                 4.2.46-28.el7                                                                      @anaconda/7.4
可安裝的軟件包
bash-completion.noarch                                                                      1:2.1-6.el7                                                                        dvd          

3、安裝bash-completion包

[root@dnsserver2 ~]# yum install -y bash-completion
[root@dnsserver2 ~]# rpm -qa bash-completion
bash-completion-2.1-6.el7.noarch

4、安裝完成

  • 提示:安裝完成后可能無法立即使用TAB鍵,這時輸入bash命令,回車后就可以正常使用了

示例:

[root@dnsserver2 ~]# ll /tmp/
總用量 0
drwx------. 3 root root 17 7月  31 10:46 systemd-private-74ec873b7e79494ab8276e8f0fcf97d4-chronyd.service-Dui4hA
drwx------. 3 root root 17 7月  31 10:46 systemd-private-74ec873b7e79494ab8276e8f0fcf97d4-vgauthd.service-LRaedH
drwx------. 3 root root 17 7月  31 10:46 systemd-private-74ec873b7e79494ab8276e8f0fcf97d4-vmtoolsd.service-RRkIJD
[root@dnsserver2 ~]# ll /tmp/systemd-private-74ec873b7e79494ab8276e8f0fcf97d4-
systemd-private-74ec873b7e79494ab8276e8f0fcf97d4-chronyd.service-Dui4hA/  systemd-private-74ec873b7e79494ab8276e8f0fcf97d4-vmtoolsd.service-RRkIJD/
systemd-private-74ec873b7e79494ab8276e8f0fcf97d4-vgauthd.service-LRaedH/

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM