Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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've set up a chrooted environment using this tutorial. But the commandline isn't displayed correctly. Instead of the usual user@hostname:/home/user# it displays -bash-4.1$. What programs are needed to get the "default" linux commandline look?

share|improve this question
up vote 0 down vote accepted

You can edit the PS[1-4] environment variables to change the layout of your bash prompt. Check out for some examples.

share|improve this answer
How do I set these variables for every login? – Stuffy Oct 15 '12 at 9:08
If you want the prompt set for every login PS1 is what you're looking for. PS1 is the environment variable that defines the primary prompt string. It is set in ~/.bashrc. Add the following to .bashrc: export PS1="\u@\h:\w\a\$" (by convention # is reserved for root, a non-administrative user should use $ or >). – jaume Oct 15 '12 at 19:46

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.