Bash Autocomplete feature on CentOS Linux
Bash autocompletion on Linux makes work much more convenient. For me it is essential because it helps me use commands quickly.
This article introduces additional Bash autocompletion for even greater convenience. It supports the command groups listed below.
aspell iconv postgresql
autoconf iftop procps
automake ifupdown python
bash-builtins info rcs
bind-utils iproute2 redefine_filedir
brctl ipsec rpcdebug
bzip2 iptables rpm
chkconfig isql rsync
configure jar screen
coreutils java service
cpio lsof sh
crontab lvm shadow
cryptsetup lzma sqlite3
cvs lzop ssh
cvsps make strace
dd man subversion
dhclient mcrypt tar
e2fsprogs mdadm tcpdump
fcoeadm module-init-tools tuned-adm
fcoemon mutt unrar
findutils mysqladmin util-linux
fuse net-tools vncviewer
gcc ntpdate xmllint
gdb open-iscsi xmlwf
genisoimage openldap xorg-x11-server-utils
getent openssl xsltproc
git perl xz
gpg2 pk-completion.bash yum
guestfish-bash-completion.sh pkg-config yum-utils.bash
gvfs-bash-completion.sh pm-utils
gzip postfix
Using Bash autocompletion
command [TAB]
command arg[TAB][TAB]
Bash autocompletion examples
[root@Ezylinux root]# man ls[TAB][TAB]
ls lscpu lshal lspci
lsassd_selinux lsdiff lshw lssubsys
lsattr lsearch lsmod
lsblk lset lsof
lscgroup lsetfilecon lsort
[root@Ezylinux root]# chkconfig h[TAB][TAB]
haldaemon halt httpd
[root@Ezylinux root]# chkconfig httpd [TAB][TAB]
off on reset resetpriorities
[root@Ezylinux root]# yum in[TAB] ly[TAB][TAB]
lynx.x86_64 lyx-common.noarch lyx-fonts.noarch lyx.x86_64
Install Bash autocompletion
[root@Ezylinux root]# yum install -y bash-completion
After installation, run the command below to activate bash_completion.
[root@Ezylinux root]# source /etc/bash_completion
Alternatively, log out and log in again.