Skip to content

Instantly share code, notes, and snippets.

@Vivelin
Created July 27, 2013 16:33
Show Gist options
  • Save Vivelin/6095385 to your computer and use it in GitHub Desktop.
Save Vivelin/6095385 to your computer and use it in GitHub Desktop.
Simply colored bash prompt in CentOS
# /etc/profile.d/prompt.sh
if [ "$PS1" ]; then
if [[ ${EUID} == 0 ]] ; then
PS1='\[\033[01;31m\]\H\[\033[01;34m\] \w \$\[\033[00m\] '
else
PS1='\[\033[01;32m\]\u@\H\[\033[01;34m\] \w \$\[\033[00m\] '
fi
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment