Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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 just created a new user on my system using useradd -d /home/users/john -m john (Using Ubuntu 11.04). This worked fine, but when I changed to john, my bash is not fully functional. That is, it has no autocomplete, I can not use they arrow keys (e.g. UP to get the last command), and instead of showing my current directory it only shows $. I loaded a .bashrc but this appears to be completely ignored. What could cause this?

PD: this user is already working on the system and I rather not remove it and add it again, if possible.

share|improve this question
Define what you mean by "when I changed to john". Did you log in with that user at the main console, on a pty, through ssh, or did you su or su -? – Paul Tomblin Nov 27 '11 at 19:36
What are the permissions/ownership on the .bashrc you loaded? – Paul Tomblin Nov 27 '11 at 19:37
up vote 21 down vote accepted

Probably john's shell is not /bin/bash, but /bin/sh. On Ubuntu, that's a shell intended to execute scripts fast, with no fancy interactive features such as command line edition. Check last column of grep john /etc/passwd or getent passwd john. You might want to run chsh -s /bin/bash john to change user's shell.

share|improve this answer
Excellent, that was indeed the case! – user11780 Nov 27 '11 at 20:03
Just a note. In Ubuntu /bin/sh is symbolic link to dash i.e. /bin/dash, so ultimately user's shell is /bin/dash. – Sachin Divekar Nov 27 '11 at 20:52

you can jump between shells by typing the name of the shell

$ bash

and in the next line you will get this following prompt


which is the bash shell. Your up arrow key and autocomplete will work now

share|improve this answer
It should be noted that is obviously temporary. The currently accepted answer has a more permanent solution. – jw013 Nov 7 '12 at 14:30
ok I didnt know that, thanks for that I will save the accepted answer for future reference – Saad Nov 8 '12 at 6:28

Your Answer


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