echo $PS1

Category: Terminal Configuration

echo $PS1

Display your current bash prompt format string

PS1 (Prompt String 1) defines what your command prompt looks like. Special sequences like \u (username), \h (hostname), \w (working directory), and \$ (# for root, $ for others) are expanded. Color codes use \[\033[...m\] escapes.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.