Yum on Fedora, CentOS, Red Hat (RHEL) is done automatically

automatic completion Many people who use Debian-based Linux are familiar with this feature, such as Debian and Ubuntu. For some reason, this feature will not be automatically activated / installed on Red Hat-based Linux distributions such as Fedora, CentOS, and Red Hat (RHEL). Actually automatic completion Works for any Bash program, but I think this is a very useful example for YUM and RPM.

1. Install bash-completion

1.1 changed to root

su -
## OR ##
sudo -i

1.2 Install bash-completion package with YUM

yum install bash-completion

1.3 Log out of the console

Then log out of the console or close the command line and log in again.

2. Autocomplete usage

[TAB] = By tab / tab

2.1 YUM Command

Example 1

[root ~]$ yum in[TAB][TAB]
info install[root ~]$ yum ins[TAB] ## and you get "yum install"

Example 2

[root ~]$ yum s[TAB][TAB]
search shell[root ~]$ yum se[TAB] ## and you get "yum search"

2.2 YUM Software Package

Example 1

[root ~]$ yum install fire[TAB][TAB]
firebird-classic.i686 firebird.i686 firecontrol.i686
firebird-devel.i686 firebird-libfbembed.i686 firehol.noarch
firebird-doc.i686 firebird-superserver.i686 firewalk.i686[root ~]$ yum install fireh[TAB] ## and you get "yum install firehol.noarch"

Example 2

[root ~]$ yum remove ge[TAB][TAB]
gedit.i686 geoclue-devel.i686 geronimo-jms.noarch gettext.i686
gegl.i686 geoclue.i686 geronimo-jta.noarch gettext-libs.i686
genisoimage.i686 GeoIP.i686 gettext-devel.i686[root ~]$ yum remove gen[TAB] ## and you get "yum remove genisoimage.i686"