How to Set Bash Prompt in Linux

The default bash prompt is kind of bare and doesn't tell you much. SSH to your machine. # set the prompt export PS1="[\u@\H][\[\033[1;34m\W\[\033[0m]\\$ "

All Articles

The default bash prompt is kind of bare and doesn't tell you much.

SSH to your machine.

# set the prompt
export PS1="[\u@\H][\[\033[1;34m\W\[\033[0m]\\$ "
Published by

anup

Technical content from the 24x7ServerSupport infrastructure, server management and cloud operations team.