Skip to main content

Change Terminal prompt on Mac

Published: 2019-10-19

Your Terminal prompt is controlled via the PS1 Bash environment variable . It’s initially defined in /etc/bashrc, and its default value is:

'\h:\W \u\$ '

See the GNU Bash reference manual for available prompt config options.

Once you find the options you like, update PS1 in your Bash config file, e.g. ~/.bash_profile, for example:

export PS1='\u@\h:\w\n\$ '

The above will display a prompt like so: