Skip to content

Instantly share code, notes, and snippets.

@iamkristian
Created May 19, 2011 11:57
Show Gist options
  • Save iamkristian/980586 to your computer and use it in GitHub Desktop.
Save iamkristian/980586 to your computer and use it in GitHub Desktop.
Colorize your prompt
#!/bin/bash
# If we're root color the thing red
if [[ ${EUID} == 0 ]] ; then
PS1="\n\033[0;31m[\u@\h]\033[1;34m[\w]\
\n\033[0;36m[\t]\033[0m\\$ "
else
PS1="\n\033[0;32m[\u@\h]\033[1;35m[\w]\
\n\033[0;36m[\t]\033[0m\\$ "
fi
[kristian@terry][~]
[11:54:07]$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment