export PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '

Category: Terminal Configuration

export PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '

Set a colored bash prompt (green user@host, blue path)

This is Ubuntu's default colored prompt. \033[01;32m is bold green, \033[01;34m is bold blue, \033[00m resets to default. The \[ and \] brackets tell bash these are non-printing characters so it calculates line width correctly.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.