Autocomplete feature is familiar to many who have used the Debian based Linux, like Debian and Ubuntu. For some reason, this feature is not automatically activated/installed on Red Hat -based Linux distros, like Fedora, CentOS and Red Hat (RHEL). Actually auto completion works with any Bash programs, but I think it’s very useful example with YUM and also with RPM.

1. Install bash-completion

1.1 Change to root

su -
## OR ##
sudo -i

1.2 Install bash-completion package with YUM

yum install bash-completion

1.3 Logout console

Then logout console or close command line and log back in.

2. Autocomplete usage

[TAB] = press tab/tabulator

2.1 YUM commands

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 packages


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"