Skip to content

Instantly share code, notes, and snippets.

@EricZimmerman
Last active June 16, 2017 22:10
Show Gist options
  • Save EricZimmerman/882fc0af77778593ca86515de2340c34 to your computer and use it in GitHub Desktop.
Save EricZimmerman/882fc0af77778593ca86515de2340c34 to your computer and use it in GitHub Desktop.
bash prompt
copy this to clipboard
PS1="\[\033[32m\][\w]\[\033[0m\]\n\[\033[1;36m\]\u\[\033[1;33m\]-> \[\033[0m\]"
in bash shell, type (note the space at the end)
export
and then copy the string from above after it, like this:
export PS1="\[\033[32m\][\w]\[\033[0m\]\n\[\033[1;36m\]\u\[\033[1;33m\]-> \[\033[0m\]"
and hit enter
to persist these settings, edit .profile under your home directory and add this to the bottom of the file
export PS1="\[\033[32m\][\w]\[\033[0m\]\n\[\033[1;36m\]\u\[\033[1;33m\]-> \[\033[0m\]"
to edit .profile, do this:
cd ~
nano .profile
CTRL-o to save
CTRL-x to exit nano
You will need to do this both for your normal user's .profile and root's .profile if you want it to persist in both places
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment