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

Possible Duplicate:
What is $debian_chroot in .bashrc?
In Bash, why is PROMPT_COMMAND set to something invisible?

I logged into my computer from a normal user and executed the following command:

pratheep@pratheep-laptop:~$ echo $PS1
\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\u@\h:\w\$

I know that if I keep the value of PS1='\u@\h:\w\$ ' then also it will display the same.

I want to know what the extra thing in front i.e.
\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)} is for?

share|improve this question

marked as duplicate by Gilles, sr_, jw013, Michael Mrozek Feb 17 '12 at 4:43

This question was marked as an exact duplicate of an existing question.

this previously asked question might be of some help – bsd Feb 15 '12 at 14:05
this Bash PS1 "Cheat Sheet" will help explain the rest of the prefix. And, of course, The Bash Prompt HOWTO – bsd Feb 15 '12 at 15:34
The debian_chroot part is explained here – Michael Mrozek Feb 15 '12 at 15:58
And the \[\e]0; ... \a\] part is explained here. – jw013 Feb 17 '12 at 0:11

Browse other questions tagged or ask your own question.