Skip to content

Instantly share code, notes, and snippets.

@Neocky
Last active February 10, 2023 00:04
Show Gist options
  • Save Neocky/56e5798d08d7793d2781718e88938b5a to your computer and use it in GitHub Desktop.
Save Neocky/56e5798d08d7793d2781718e88938b5a to your computer and use it in GitHub Desktop.
Linux Colored Shell

Linux Colored Shell

Color scheme based of One Dark Pro

image

How to

  1. Open file: nano ~/.bashrc
  2. Add to end of file:
PS1="\[$(tput bold)\]\[\033[38;5;9m\]\u\[$(tput sgr0)\]\[\033[38;5;7m\]@\[$(tput bold)\]\[\033[38;5;171m\]\H\[$(tput sgr0)\]\[\033[38;5;7m\]:\[$(tput sgr0)\]\[$(tput bold)\]\[\033[38;5;41m\]\w\[$(tput sgr0)\]\\$ \[$(tput sgr0)\]"
  1. Restart bash with: source ~/.bashrc

Color Scheme:

user@machine:~/folder$ cd ..

User       = red (bold)
@          = gray (bold)
machine    = purple (bold)
:          = gray
~/folder   = light green (bold)
$            = white

Your own color scheme

Visit this site and create your own bash color scheme:
http://bashrcgenerator.com/

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