Kolororwanie BASH prompt (zmiana PS1)
Aby zmiany działały dla pojedyńczego usera zmieniamy plik .bash_profile w HOME usera "~"
cd ~
vim .bash_profile
Serwery testowe:
# User specific environment and startup programs
export PS1="\[\033[00;36m\]\u\[\033[00;32m\]@\[\033[01;32m\]\h\[\033[00m\\]:\[\033[01;34m\]\w\[\033[01;37m\]$\[\033[00m\]: "
Serwery produkcyjne:
# User specific environment and startup programs
export PS1="\[\033[00;36m\]\u\[\033[00;32m\]@\[\033[1;31m\]\h\[\033[00m\]:\[\033[1;31m\]\w\[\033[1;37m\]$\[\033[00m\]: "
User ROOT, serwery TST:
# Root-User specific environment and startup programs
export PS1="\[\033[1;31m\]\u\[\033[1;37m\]@\[\033[01;32m\]\h\[\033[00m\\]:\[\033[01;34m\]\w\[\033[01;37m\]#\[\033[00m\]: "
User ROOT, serwery PRD:
# Root-User specific environment and startup programs
export PS1="\[\033[1;31m\]\u\[\033[1;37m\]@\[\033[1;31m\]\h\[\033[00m\]:\[\033[1;31m\]\w\[\033[1;37m\]#\[\033[00m\]: "
Full Violet
# FoolsTheory-User specific environment and startup programs FoolsTheory Violet:
export PS1="\[\033[1;35m\]\u\[\033[1;37m\]@\[\033[1;35m\]\h\[\033[00m\]:\[\033[1;35m\]\w\[\033[1;37m\]$\[\033[00m\]: "
Można także zmieniać w formacie HEX:
# FoolsTheory-User specific environment and startup programs FoolsTheory Violet:
export PS1="\[\e[38;2;176;132;204m\]\u\[\e[0m\]@\[\e[38;2;176;132;204m\]\h:\w\[\e[0m\] \$ "