Last active
March 5, 2025 04:05
-
-
Save pepoluan/8af3f6a831c42fe21fb258dfb62bfad6 to your computer and use it in GitHub Desktop.
Simple Colorized Bash Prompt One-Liners
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# NO NEED to make a script | |
# Just choose any one variant, and copy that one line | |
# Then paste in a new session | |
#1 Green hostname, bold white command | |
export PS1="\n"'\[\033[0m\][\u@\[\033[1;32m\]\h\[\033[0m\] \W]\$ \[\033[1m\]'; export PS0='\[\033[0m\]' | |
#2 Green hostname, bold cyan command | |
export PS1="\n"'\[\033[0m\][\u@\[\033[1;32m\]\h\[\033[0m\] \W]\$ \[\033[1;96m\]'; export PS0='\[\033[0m\]' | |
#3 Green hostname, bold yellow command | |
export PS1="\n"'\[\033[0m\][\u@\[\033[1;32m\]\h\[\033[0m\] \W]\$ \[\033[1;93m\]'; export PS0='\[\033[0m\]' | |
#4 Like #1, but no enclosing brackets | |
export PS1="\n"'\[\033[0m\]\u@\[\033[1;32m\]\h\[\033[0m\] \W\$ \[\033[1m\]'; export PS0='\[\033[0m\]' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment