Linux

Add Bash Auto Completion In CentOS 8

Add Bash Auto Completion In CentOS 8
Written by itsubuntu

Insight: Tutorial to add bash auto completion in CentOS 8.

This tutorial will answer to your question about:

  1. How to add bash auto completion in CentOS 8
  2. How do I enable autocomplete feature in CentOS 8

Add Bash Auto Completion In CentOS 8

Open your terminal and run the following command to search for bash-completion on CentOS 8:

sudo yum search bash-completion

Or,

yum list bash-completion

Now, run the following command to add bash-completion CentOS 8. Type the following yum command to install auto-completion in CentOS 8:

sudo yum install bash-completion

OR

sudo dnf install bash-completion

The above command placed a shell script called /etc/profile.d/bash_completion.sh:

more /etc/profile.d/bash_completion.sh

OR

cat /etc/profile.d/bash_completion.sh

Run the following command to enable bash completion and enable it from the current session:

source /etc/profile.d/bash_completion.sh

Press the [TAB] key while typing a command to auto-complete syntax or options:

sudo dnf i[TAB]
cat /etc/ho[TAB]


About the author

itsubuntu

Subscribe To Our Newsletter

Subscribe To Our Newsletter

Dear lovely people, Welcome to itsubuntu.com

Join our mailing list to receive the freebies, tutorials, latest news and updates from our team.

You have Successfully Subscribed!