Wednesday, April 3, 2013

Make atractive color for your Linux shell prompt.

You can make actractive colors for your linux servers shell prompt.

Add the following lines to your home directories .bashrc file.

export PS1='\[\033[01;31m\]\u\[\033[01;33m\]@\[\033[01;36m\]\h \[\033[01;33m\]\w \[\033[01;35m\]\$ \[\033[00m\]'

Here you can see  color codes used for user , @, hostname , w, etc in the above scripts. By changing the values you can use your own colors.

 ajeesh@tech3:~$ export PS1='\[\033[01;31m\]\u\[\033[01;33m\]@\[\033[01;36m\]\h \[\033[01;33m\]\w \[\033[01;35m\]\$ \[\033[00m\]'

ajeesh@tech3 ~ $


No comments:

Post a Comment