Super User is a question and answer site for computer enthusiasts and power users. 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 use Debian 6 and the terminal. When I type su -l I get something like this:


as prompt. When I type su -l someuser I get this prompt:


There, I cannot use TAB to autocomplete paths, the source command is not known etc. How can I get the "style" of the root for every user? Does this depend on the distinction between bash, shell?

share|improve this question
up vote 2 down vote accepted

Yes, it depends on which shell is used. By default, new user accounts have their shell set to /bin/sh, the Bourne shell, which does not support more advanced features such as line editing, completion, etc.

Use chsh to change the user's shell. For example,

chsh -s $(which bash) someuser

will change someuser's shell to bash. You must give the full path to -s, and that path should be listed in /etc/shells.

I don't know which one you are currently using for root, so run echo $SHELL to find out. (Alternatively, run getent passwd root; the shell will be the last (7th) field.)

share|improve this answer
Great, thank you! – strauberry Jun 8 '11 at 7:44

Edit the user's .bashrc and enable bash completion or type . /etc/bash_completion.

share|improve this answer
does this enable the source command, too? I use the .profile files for all users... – strauberry Jun 5 '11 at 18:00
source is a shell builtin. It doesn't need to be enabled. – bahamat Jun 5 '11 at 18:11
source is a bash-specific alias for the "." command. It might not exist on other shells, while . always works. – grawity Jun 5 '11 at 19:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .