Take the 2-minute tour ×

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

1 Answer 1

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 http://www.thegeekstuff.com/2008/09/bash-shell-ps1-10-examples-to-make-your-linux-prompt-like-angelina-jolie/ 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


