Go Back   HostGator Peer Support Forums > HostGator Peer Support Forums > Linux VPS Support

Notices

Reply
 
Thread Tools
  #1  
Old 12-08-2009, 06:42 PM
jenolan's Avatar
jenolan jenolan is offline
Hatchling Croc
 
Join Date: Jan 2008
Posts: 33
Default rooting in colour

If you are like me and use ssh quite a bit you may have more than one window open. Not a huge problem unless one is root, then you can do pretty ugly things by 'accident'.

What I do is make the command prompt display my root login path in red like this;
root@example [/home/mysite/www/help]#
So in your /root/.bashrc at the bottom add
Code:
export PS1='\u@\h [\[\e[31;1m\]\w\[\e[0m\]]# '
and you can root in colour too!

Larry
Reply With Quote
  #2  
Old 06-06-2010, 02:18 PM
chaloupe chaloupe is offline
King Croc
 
Join Date: Nov 2004
Location: Dieppe, New-Brunswick, Canada
Posts: 1,427
Default Re: rooting in colour

Thanks for sharing! The color red to my eye make it like it's a new program. Any change is good when you get bored of black, white and blue.

I tried a few different colors in putty > Configuration > Window > Colours (isn't this misspelled?) but it's refreshing to root as red.

useful for me
__________________
Jean Boudreau - IT for local businesses
It's all about automation!
Any data backup of your company?

Reply With Quote
  #3  
Old 06-12-2010, 08:49 PM
GatorSCrothers
HostGator Guest
 
Posts: n/a
Default Re: rooting in colour

I'm currently using this for my personal server.

However its really useless unless you have root access to the machine, but it does however have a fancy pwd pruning script that makes your prompt nice and neat.

Works best in /etc/bashrc
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -5. The time now is 01:15 AM.