Bashrc customization: Difference between revisions

From D3xt3r01.tk
Jump to navigationJump to search
m (New page: ==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 ...)
 
 
(One intermediate revision by the same user not shown)
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\]BACKGW \[\e[35;1m\]\w\[\e[37;1m\] > \[\e[0m\]"
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>


Line 16: Line 16:


[[Category: Linux]]
[[Category: Linux]]
[[Category: Bash
[[Category: Bash]]

Latest revision as of 23: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.