1)first of all - backup your .bashrc file
2)now edit .bashrc with your editor:cp .bashrc .bashrc-backup
search for lines that contain the string: PS1gedit .bashrc
and comment them (with # before them).
in the end of the file add:
the first color is for the normal font and barckets, and the second one is for the user name and hostPROMPT_HOSTNAME='SET_HERE'
PROMPT_COLOR='1;37m'
PROMPT_COLOR2='1;32m'
PS1='\e[${PROMPT_COLOR}[\e[${PROMPT_COLOR2}\u@${PROMPT_HOSTNAME}\e[${PROMPT_COLOR}] $ '
I choosed green and white. you can change the first number to any of the following:
in the exmaple "1;37m" you will have to change the 37 to another number.30: Black/Dark grey
31: Red
32: Green
33: Yellow
34: Blue
35: Magenta
36: Fuscia
37: White/light grey
38: "Default" foreground color
the 1 before it can be set into zero, it is for light \ dark colors
rename the PROMPT_HOSTNAME to your hostname (or anything you want)
and save the file.
pray for your god and open bash, it should work.
it should be like this:
http://www.base17.hostorm.biz/Bash.png
EDIT: I have updated the pic. I used a new PS1
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\e[${PROMPT_COLOR2}\u@\h\[\033[00m\]:\[\033[1;37m\]\w\[\033[00m\]\$ '
it is not perfect yet, play with the colors and stuff as much as you want.
another one:
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\e[${PROMPT_COLOR2}\u@\h\[\033[00m\]:\[\033[1;37m\]\w\[\033[00m\]\$ '
i think this is the nicest until now
for more info:
http://www.neowin.net/forum/lofivers...p/t148706.html
http://networking.ringofsaturn.com/U...sh-prompts.php
good luck



Adv Reply






Bookmarks