In my bash terminal, I would usually press tab twice to get the file and folder list. For instance cat 2XTAB would list all files and folders in the present directory and cd Proj2XTAB would list all the directories starting with "Proj".

I do not see this behaviour (of listing files and directories on double TAB on a new machine (where I do not have root access). Instead double TAB and subsequent TABs cycles through the list of files or directories. This is problematic because there are a lot of files in the directory and directory structure is very deep; thus, I can not use ls to list files every time.

  • Are you sure you're using bash on that new machine?
    – ott--
    Mar 24, 2015 at 23:14
  • Yes. I checked using ps -p $$ Mar 24, 2015 at 23:16
  • What's your bash version? echo $BASH_VERSION
    – Cyrus
    Mar 25, 2015 at 0:08

2 Answers 2


Try this command:

bind 'TAB:complete'


bind '"\t":complete'
  • Tried didn't work Mar 24, 2015 at 23:59
  • @zimbra314: I've updated my answer.
    – Cyrus
    Mar 25, 2015 at 0:03
  • 1
    The second option worked in my case. Mar 25, 2015 at 0:19
  • 1
    The sake of completeness: If you want your old Windows cmd.exe style back again: bind '"\t":menu-complete'
    – Cyrus
    Mar 25, 2015 at 0:28

This is controlled by a setting within readline autocompletion. If you look at the man page for bash and search for "Completing" you'll see the configuration settings complete, possible-completions and menu-complete. These can be declared system-wide in /etc/inputrc, and optionally overridden per-user in $HOME/.inputrc.

In your $HOME/.inputrc add this line, creating the file if necessary:

"\C-i": complete

(include the double quotes and the backslash). Restart bash and you will have your TAB key working as you want, again.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .