Skip to content

Instantly share code, notes, and snippets.

@jermdw
Created August 7, 2018 04:57
Show Gist options
  • Save jermdw/01c4258dec3b689cae2087472e6efdd2 to your computer and use it in GitHub Desktop.
Save jermdw/01c4258dec3b689cae2087472e6efdd2 to your computer and use it in GitHub Desktop.
Bash - Red Root Prompt

Prompt is green for standard user and turns red when elevated to root

PS1='${debian_chroot:+($debian_chroot)}\[\033[01;31m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '

PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '

Reference

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