Make available to autocomplete suggestions in your terminal

Again and again typing the same things in the terminal is the worst things. After a long search, I found a simple solution to enable autocomplete options on the terminal.

Normally, Linux bash use readline for its auto-completions, add the following line to enable auto-completions on your terminal.

**** Caution ****

The following change file contains most important configuration. Be careful on work with this. Don’t touch other lines.

Open the /etc/inputrc in your favourite editor. I am using nano

sudo nano /etc/inputrc

Then add the following commands

# mappings for making up and down arrow searching through history:
“\e[A”: history-search-backward
“\e[B”: history-search-forward
“\e[C”: forward-char
“\e[D”: backward-char

#Use [Tab] and [Shift]+[Tab] to cycle through all the possible completions:
“\t”: menu-complete
“\e[Z”: menu-complete-backward

That’s it. ctrl + x to save and exit the terminal and reopen it.

Yeah! Auto-completion is enabled.

Alternative Option: You may able to using the reverse key functionalities as Ctrl + R and use the arrows to move the relevant regular expression.


(adsbygoogle = window.adsbygoogle || []).push({});


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s