I'm using a Ubuntu server via ssh. Everything is fine under root but if I create and login into the users I create, the navigation keys became ^[[A ^[[B etc. And the original functions such as previous command is gone. I don't know where I go wrong.
1 Answer
It sounds like you are not setting your created user's shell to bash. If you do not set this explicitly, the system uses the default (see /etc/default/useradd). Try adding this option to your useradd command:
-s /bin/sh
I also recommend creating a file in your home directory called .inputrc with the following lines:
"\e[A": history-search-backward
"\e[B": history-search-forward
This makes the Up button search only for those commands that start with whatever you have typed. So, if you type "sudo" and hit up only those commands starting with sudo will be shown.
$TERM
?