First we have to open bash profile to locate bash prompt.
It is available in user's home ~
directory by the name .bashrc
.
It is set using $PS1 variable.
In all we have $PS1
, $PS2
, $PS3
and $PS4
variable for the following purposes.
- PS1 – This is the primary prompt display. This is where you set special characters or important information.
- PS2 – This is the secondary prompt string. This is usually set as a divider between the prompt display and the text entry. It is also used to display when a long command is broken into sections with the \ sign.