This value of
PS1 is set by the bash system-wide configuration file
/etc/bash.bashrc. You can override it by setting it from your
PS1 is a shell variable. Its meaning depends on the shell. It should normally not be exported since it is not supposed to be in process's environments, though you can get away with it if you only ever use one shell.
Note that bash is rather quirky about configuration files: if you start a login instance of bash, it reads only
~/.profile if there is no
~/.bash_profile. If you start a non-login interactive instance, it reads
/etc/bash.bashrc (if configured to do so) and
~/.bashrc. In order to get your interactive settings in login instances of bash, you should put this code in your
if [ -r ~/.profile ]; then
case $- in *i*) if [ -r ~/.bashrc ]; then . ~/.bashrc; fi;; esac
The shell variable
$- contains the letter
i to indicate that the shell is interactive.