Last active
June 16, 2017 22:10
-
-
Save EricZimmerman/882fc0af77778593ca86515de2340c34 to your computer and use it in GitHub Desktop.
bash prompt
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
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