• Skip to main content

Uly.me

cloud engineer

  • Home
  • About
  • Archives

style

Styling The Bash Prompt

February 26, 2019

Great article how to style your Bash prompt. Make sure you are using Bash shell, because you could be using another shell. Use this to display your current shell. Just type “bash” to start using Bash shell.

echo $0
bash

echo $0 bash

I use the prompt style below. See the result underneath PS1. You may have to exit and re-enter your Terminal to see results.

PS1="\u@\h:\w: "
ulysses@localhost:/var/www:

PS1="\u@\h:\w: " ulysses@localhost:/var/www:

Filed Under: Linux Tagged With: bash, prompt, style

  • Home
  • About
  • Archives

Copyright © 2023