user
#1
Good day,
Excuse for considering a foolish question, that affects in nothing the
normal operations of the system.
How to show console prompt color at the users non root?
srv # root show red color, non root no show color
Thank for your help,
Regards,
Juan L. Mera
vodoo
#2
Look at this configuration file:
/etc/bash.bashrc
Color for root is set at line 191 and following lines (11.3). You can do a similar thing for other users if you like, but preferrably in ~/.bashrc
Hi
I use the following in my ~/.bashrc
RS="\\033[0m\]" # reset
HC="\\033[1m\]" # hicolor
UL="\\033[4m\]" # underline
INV="\\033[7m\]" # inverse background and foreground
FBLK="\\033[30m\]" # foreground black
FRED="\\033[31m\]" # foreground red
FGRN="\\033[32m\]" # foreground green
FYEL="\\033[33m\]" # foreground yellow
FBLE="\\033[34m\]" # foreground blue
FMAG="\\033[35m\]" # foreground magenta
FCYN="\\033[36m\]" # foreground cyan
FWHT="\\033[37m\]" # foreground white
BBLK="\\033[40m\]" # background black
BRED="\\033[41m\]" # background red
BGRN="\\033[42m\]" # background green
BYEL="\\033[43m\]" # background yellow
BBLE="\\033[44m\]" # background blue
BMAG="\\033[45m\]" # background magenta
BCYN="\\033[46m\]" # background cyan
BWHT="\\033[47m\]" # background white
PS1="$HC$FBLE$(ppwd \l)\u@\h:\w\$ $RS"
PS2="$HC$FBLE> $RS"
So my user prompt is FBLE (foreground blue)
–
Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.3 (x86_64) Kernel 2.6.34.7-0.5-default
up 19:16, 2 users, load average: 0.17, 0.12, 0.04
GPU GeForce 8600 GTS Silent - Driver Version: 260.19.12