Wednesday, May 11, 2016

How to enable command autocomplete and history on Linux

After installing some Linux distributions such as Debian, you might find that the command autocomplete and command history are not enabled by default, so that you cannot use TAB or the cursor movement keys from the command line.

What is actually happening is that the shell you have in some distributions by default is sh, which is tedious to use. However, you can easily switch to a superset called bash, which incorporates these two features that will save you a lot of time. This is how you do it.

1) Type the command chsh
2) Type your password
3) Type as login shell: /bin/bash
4) Logout and sign in again. Autocomplete and command history should be enabled now.