The PS1 variable can be getting set in any number of place, the most common of which would include: ~/.bashrc ~/.profile ~/.bash_profile /etc/profile The actual formatting sequence for emitting the command number in the prompt string is \! (that's Backslash Bang, in case your mailer decided to munge that literal sequence... ) .