Bashrc customization: Difference between revisions
From D3xt3r01.tk
Jump to navigationJump to search
m →HOW |
m →HOW |
||
Line 10: | Line 10: | ||
<source lang="bash"> | <source lang="bash"> | ||
PS1="\[\e[37;1m\][\[\e[31;1m\]`date +%H`\[\e[37;1m\]:\[\e[31;1m\]`date +%M`\[\e[37;1m\]]\[\e[33;1m\]\u\[\e[37;1m\]@\[\e[34;1m\] | PS1="\[\e[37;1m\][\[\e[31;1m\]`date +%H`\[\e[37;1m\]:\[\e[31;1m\]`date +%M`\[\e[37;1m\]]\[\e[33;1m\]\u\[\e[37;1m\]@\[\e[34;1m\]${HOSTNAME} \[\e[35;1m\]\w\[\e[37;1m\] > \[\e[0m\]" | ||
</source> | </source> | ||
Latest revision as of 22:14, 24 November 2009
WHY
Because I had too many consoles looking the same way and it was rather hard to identify who is who at first look.
HOW
Depending on your distro ( Gentoo has /etc/bash/bashrc , Fedora has /etc/bashrc )
I like to put this:
PS1="\[\e[37;1m\][\[\e[31;1m\]`date +%H`\[\e[37;1m\]:\[\e[31;1m\]`date +%M`\[\e[37;1m\]]\[\e[33;1m\]\u\[\e[37;1m\]@\[\e[34;1m\]${HOSTNAME} \[\e[35;1m\]\w\[\e[37;1m\] > \[\e[0m\]"
For both UID 0 and others.