How to do tab auto completion on CentOS8 & Amazon Linux2

Both are Linux based OS, most of them have this installed by default

How to do tab auto completion on CentOS8 & Amazon Linux2

Tab Auto Completion for CentOS

Prerequisite:

  1. Beginner knowledge of Linux bash not required but it will make it ease.
  2. CentOS any stream will work but this is focused on CentOS8

Situation: After using Ubuntu , I felt like I was missing the quick tap auto completion very badly. So I'm doing this post just for this Tab auto completion. I tried this after looking at several other posts and its working for me.

Just two commands are needed

Make sure you update your CentOS, if you are the root user leave out sudo keyword.

sudo yum update

image.png now apply your password

Use this command to install bash auto completion

sudo yum search bash-completion

Logoff or exit out of the server and log back in to check if its working

image.png

It works now, enjoy :-)

image.png

Amazon Linux2 Tab auto Completion

Use this command to install bash auto completion

sudo yum install bash-completion