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 created a new user using the following command:

sudo useradd -m jkeesh
sudo passwd jkeesh

Everything is working fine. I can able to log in and to do other stuffs. But in the command line, I'm missing the ability and features of real Ubuntu. What I mean is , when I tried to move to end of the command using my direction keys, I get this:

^[[A^[[A^[[D^[[D^[[D^[[B^[[C

And there is no auto completion. Hitting the tab key doesn't help.

Where I'm making the mistake?

I'm very new to Ubuntu, I need some help.

share|improve this question
add comment

3 Answers

up vote 3 down vote accepted

This is because the default shell is bin/sh.

You should do this. Edit /etc/passwd and check for the line that has jkeesh as username. You will see something like :

jkeesh:x:1005:1005::/home/jkeesh:/bin/sh

Change the line to bin/sh to bin/bash.

This should fix your problem.

share|improve this answer
2  
Supplementary link to SU –  jokerdino Aug 24 '12 at 6:36
add comment

You say you are new to Ubuntu, then maybe you would be better using System Settings > User Accounts to add new users. System Settings is available by clicking on the gear wheel icon at the top right of the screen.

share|improve this answer
add comment

You created the new user using the useradd command, which provides the new user a default sh shell. You could have used it this way - useradd -d /home/user -s /bin/bash -G group -m user (remove the -g in case you don't want him to be in a specific group) to get the bash shell.

But since you have created the user anyways, we need to change the shell to bash, and then you will have all the features you want.

On your Terminal, do chsh. Enter the sudo password, and enter /bin/bash and enter. This should get you going. I guess you will need to do a system restart.

edit: Prefer the adduser utility over useradd

share|improve this answer
add comment

Your Answer

 
discard

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.