Skip to content

Instantly share code, notes, and snippets.

@eliranmal
Last active December 13, 2021 05:21
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eliranmal/59eb7edd6c815ea735f29e70b19a1783 to your computer and use it in GitHub Desktop.
Save eliranmal/59eb7edd6c815ea735f29e70b19a1783 to your computer and use it in GitHub Desktop.
customize your prompt line to match your fedora

redhat bash prompt

customize your prompt line to match your fedora

how to

  • add this somewhere in your .bash_profile (or .bashrc)

    PS1=""
    PS1="$PS1\[\033[34m\]\u"      # [blue]{user}
    PS1="$PS1\[\033[33m\]@"       # [yellow]@
    PS1="$PS1\[\033[31m\]red🎩"   # [red]red(hat)
    PS1="$PS1\[\033[00m\]  \w\n"  # [no color]<space><space><work-dir-path><newline>
    PS1="$PS1\[\033[33m\]$ "      # [yellow]$<space>
    PS1="$PS1\[\033[00m\]"        # [no color]
    export PS1
    
  • restart your terminal (or run . ~/.bash_profile)

  • you're good to go :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment