Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have installed ubuntu minimal(mini.iso) on my vm. I then used recovery mode to login as root and create an account with useradd -m admin and then set a password with passwd admin.

When I login on the new account, instead of the normal prompt I only see a $ sign. If I try to tab-complete a command or file name it prints a normal tab. If I try to use the arrow keys it prints ^[[A, ^[[B, ^[[C or ^[[D. Also, ls no longer adds colors.

None of these problems were in recovery mode. How can I fix this?

share|improve this question
The $ prompt is for a user. root's prompt is #. The arrow keys do not work in terminal, you need to type in something like unity to run the Unity shell –  SimplySimon Jul 28 '13 at 20:12
@SimplySimon The up and down arrow keys are supposed to switch through previous commands, the left and right arrow keys are supposed to scroll through the current command, and tab should complete the command or file name. The path should be written to the left of the $... –  Runemoro Jul 28 '13 at 20:18
Very true, of course they do. sorry –  SimplySimon Jul 28 '13 at 20:22

1 Answer 1

up vote 25 down vote accepted

That probably means that the new user account was created with /bin/sh as its login shell (which symlinks to the dash shell by default) instead of /bin/bash - you can change a user's login shell with the 'chsh' command

sudo chsh -s /bin/bash <username>

(you will need to log out and back in for the change to take effect). You may also need to copy the default .bashrc from /etc/skel to get the color prompt.

In future you might want to use the 'adduser' command instead of 'useradd' - it sets up a more complete user environment including things like a default .profile and .bashrc - as well as setting the login shell to 'bash'

share|improve this answer
Thought i messed up putty... Thank you, Sir! –  Aiyion.Prime Nov 14 '14 at 0:30
Additional tip: A user may change this for their own account without requiring sudo rights (just omit sudo in above command). –  Cedric Reichenbach Feb 17 at 16:20

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.