Skip to content

Instantly share code, notes, and snippets.

How to make Bash Prompt more live and fun.
To be more specific - every time when Enter is pressed random ASCII and UTF symbol is printed in bash prompt.
Just add to ~/.bashrc
if [ "$LOGNAME" = root ] || [ "`id -u`" -eq 0 ] ; then
export PS1="\[\e[01;23;38;5;11;48;5;214m\] \[\e[01;31m\]$(/bin/hostname | tr "[:lower:]" "[:upper:]") \[\e[38;5;11;48;5;1m\]#\[\e[22;38;5;196;48;5;16m\] "