[20191230]rhel 7.7 bash_completion如何啟動.txt

lfree發表於2019-12-31

[20191230]rhel 7.7 bash_completion如何啟動.txt

# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.7 (Maipo)

# rpm -qa --last | grep bash
bash-4.2.46-33.el7.x86_64                     Thu 05 Dec 2019 02:13:53 AM CST
bash-completion-2.1-6.el7.noarch              Thu 23 Aug 2018 11:42:08 AM CST

--//已經安裝bash-completion,但是我發現沒有起作用.看了一下文件,必須手工加入

#  vim /etc/bashrc
...
# Use bash-completion, if available
[[ $PS1 && -f /usr/share/bash-completion/bash_completion ]] && \
    . /usr/share/bash-completion/bash_completion

--//順便下載並安裝了bash-completion-extras包.


--//主要目的是方便學習systemctl命令.

# systemctl
add-requires           default                halt                   kexec                  mask                   reset-failed           status
add-wants              delete                 help                   kill                   poweroff               restart                stop
cancel                 disable                hibernate              link                   preset                 set-default            suspend
cat                    edit                   hybrid-sleep           list-dependencies      reboot                 set-environment        switch-root
condreload             emergency              is-active              list-jobs              reenable               set-property           try-restart
condrestart            enable                 is-enabled             list-sockets           reload                 show                   unmask
condstop               exit                   is-failed              list-timers            reload-or-restart      show-environment       unset-environment
daemon-reexec          force-reload           isolate                list-unit-files        reload-or-try-restart  snapshot
daemon-reload          get-default            is-system-running      list-units             rescue                 start

--//感覺systemctl搞得很複雜!!

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-2671475/,如需轉載,請註明出處,否則將追究法律責任。

相關文章