Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm new to Linux, trying Ubuntu 10.04, preconfigured by host.

When I log in (SSH) using the preconfigured account, the shell prompt is: user@hostname:~$

The up arrow scrolls through the list of recent shell commands, and tab-completion works as expected.

However, when I create an account and log in (SSH) using that account, the shell prompt is simply "$", and the up arrow just prints a control character (^[[A).

Can anyone tell me how to get my prompt, tab-completion, and up-arrow behavior set up? The fact that I'm getting control characters when I up-arrow makes me think that my account (or session) is in some mode I'm unfamiliar with.

I know there is tab-completion code stored in bashrc that I can uncomment, but that doesn't seem to have any effect, even after logging out and logging back in.

Am I in some strange mode when I SSH in with the new account, or are there just some session/account settings I need to set up, and can find information for anywhere on the Internet if I just knew what to look for?

share|improve this question
up vote 33 down vote accepted

My first guess is that the default shell is sh rather than Bash. Use chsh to change it. You will need to log out and log back in to make the change take effect.

share|improve this answer
Yep. You nailed it. Just checked. Thanks! – pastorius Oct 28 '10 at 16:45
edited /etc/passwd , changed to /bin/bash.. Thank you Dennis Williamson :) – user233226 Jul 17 '14 at 5:58

Other way is open /etc/passwd file and change the shell /bin/sh to /bin/bash

share|improve this answer

As mentioned by Dennis Williamson the problem was the default shell. I was using Debian and my non-root user defaulted to sh.


Re-logged in and problem solved.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.