CentOS Icon CentOS Logo
CentOS Text
   
  
www.centos.org Forum Index
   CentOS 5 - Miscellaneous Questions
  color of root@localhost

 

 Bottom   Previous Topic   Next Topic
  •  Rate Thread
      Rate this Thread
      Excellent
      Good
      Average
      Bad
      Terrible
Poster Thread
  •  eXit
      eXit
color of root@localhost
#1
Regular Board Member
Joined: 2008/5/15
From
Posts: 62
Hi. Would you tell me please , how can I change color of root@localhost inside console???? Thank you.
_________________
trust_no_1
Posted on: 2008/8/27 16:02
Create PDF from Post Print
Top
  •  gerald_clark
      gerald_clark
Re: color of root@localhost
#2
Professional Board Member
Joined: 2005/8/5
From Northern Illinois, USA
Posts: 4447
What do you mean?
Where do you see these colors, and what are you doing when you see them?
Posted on: 2008/8/27 16:26
Create PDF from Post Print
Top
  •  michaelnel
      michaelnel
Re: color of root@localhost
#3
Professional Board Member
Joined: 2006/5/29
From San Francisco, CA
Posts: 1484
Do you hear the voices too?
Posted on: 2008/8/27 16:34
Create PDF from Post Print
Top
  •  eXit
      eXit
Re: color of root@localhost
#4
Regular Board Member
Joined: 2008/5/15
From
Posts: 62
When you open console there you have :
[root@my ~]#

and i would like to have red.

No , voices I do not hear... so far.
_________________
trust_no_1
Posted on: 2008/8/27 16:35
Create PDF from Post Print
Top
  •  gerald_clark
      gerald_clark
Re: color of root@localhost
#5
Professional Board Member
Joined: 2005/8/5
From Northern Illinois, USA
Posts: 4447
I don't get color.
Where do I complain?
Posted on: 2008/8/27 17:01
Create PDF from Post Print
Top
  •  AlanBartlett
      AlanBartlett
Re: color of root@localhost
#6
Moderator
Joined: 2007/10/22
From ~/Earth/UK/England/Suffolk
Posts: 5934
Could it be that the OP wants to set the colour of the environment variables PS1 to PS4?
_________________
Alan.

100% Unix & Linux. Co-founder of the ELRepo Project.
Posted on: 2008/8/27 17:20
Create PDF from Post Print
Top
  •  eXit
      eXit
Re: color of root@localhost
#7
Regular Board Member
Joined: 2008/5/15
From
Posts: 62
I would like to change color letters of:
[root@my ~]#
_________________
trust_no_1
Posted on: 2008/8/27 17:21
Create PDF from Post Print
Top
  •  NedSlider
      NedSlider
Re: color of root@localhost
#8
Moderator
Joined: 2005/10/28
From UK
Posts: 2865
I heard the voices and they said unto me...

export PS1="\[\e[31;1m\][\u@\[\e[31;1m\]\H \W]# \[\e[0m\]"
_________________
CentOS - The Sysadmins Choice
ELRepo.org - The Community Enterprise Linux Repository
Posted on: 2008/8/27 17:53
Create PDF from Post Print
Top
  •  AlanBartlett
      AlanBartlett
Re: color of root@localhost
#9
Moderator
Joined: 2007/10/22
From ~/Earth/UK/England/Suffolk
Posts: 5934
That's what I think the OP wants Ned. You saved me having to look up the escape sequences.

He will put that line, I guess, into root's .bashrc file.
_________________
Alan.

100% Unix & Linux. Co-founder of the ELRepo Project.
Posted on: 2008/8/27 18:00
Create PDF from Post Print
Top
  •  eXit
      eXit
Re: color of root@localhost
#10
Regular Board Member
Joined: 2008/5/15
From
Posts: 62
Thank you . That what I needed. But how do you know NedSlider number 31 is red? If I want to use green ,what number would that be? Do you have some color's table?
And how much people usually donating ?
_________________
trust_no_1
Posted on: 2008/8/27 19:05
Create PDF from Post Print
Top
  •  NedSlider
      NedSlider
Re: color of root@localhost
#11
Moderator
Joined: 2005/10/28
From UK
Posts: 2865
Quote:

eXit wrote:
Thank you . That what I needed. But how do you know NedSlider number 31 is red? If I want to use green ,what number would that be? Do you have some color's table?
And how much people usually donating ?


Green would be 32

See here for donation guideline information:

http://www.centos.org/modules/tinycontent/index.php?id=23

For a donation, I'd probably let you into a secret that I did a quick google search and came up with this page, complete with colour chart:

http://www.ibm.com/developerworks/linux/library/l-tip-prompt/

_________________
CentOS - The Sysadmins Choice
ELRepo.org - The Community Enterprise Linux Repository
Posted on: 2008/8/27 19:20
Create PDF from Post Print
Top
  •  toracat
      toracat
Re: color of root@localhost
#12
Moderator
Joined: 2006/9/3
From California, US
Posts: 5070
OK, people, now that you have seen Ned's secret, you are all expected to donate Or, wipe your memory.

Ned, it's time to put them together into a nice Tips and Tricks article.
_________________
Useful links: Search Forums; Forum FAQ; CentOS Wiki
Posted on: 2008/8/27 19:29
Create PDF from Post Print
Top
  •  eXit
      eXit
Re: color of root@localhost
#13
Regular Board Member
Joined: 2008/5/15
From
Posts: 62
So, I sent you something . Hopefully I helped you a little bit. And thanks for that colorization.
_________________
trust_no_1
Posted on: 2008/8/27 20:23
Create PDF from Post Print
Top
  •  NedSlider
      NedSlider
Re: color of root@localhost
#14
Moderator
Joined: 2005/10/28
From UK
Posts: 2865
Quote:

eXit wrote:
So, I sent you something . Hopefully I helped you a little bit. And thanks for that colorization.


Thank you very much - I'm sure the project will appreciate the donation
_________________
CentOS - The Sysadmins Choice
ELRepo.org - The Community Enterprise Linux Repository
Posted on: 2008/8/27 20:25
Create PDF from Post Print
Top
  •  eXit
      eXit
Re: color of root@localhost
#15
Regular Board Member
Joined: 2008/5/15
From
Posts: 62
I was little bit playing . Try this two. You can to change color of every word or symbol.

PS1="\[\e[30;10m\][\[\e[31;10m\]\u\[\e[36;10m\]@\[\e[31;10m\]\H\[\e[30;10m\]] \[\e[34;10m\]\W\[\e[34;10m\]/ \[\e[0m\]\[\e[32;10m\]>\[\e[0m\] "

PS1="\[\e[30;10m\][\[\e[31;10m\]\u\[\e[30;10m\]]\[\e[34;10m\]\W\[\e[34;10m\]/ \[\e[0m\]\[\e[32;10m\]>\[\e[0m\] "
_________________
trust_no_1
Posted on: 2008/8/27 22:23
Create PDF from Post Print
Top
  •  AlanBartlett
      AlanBartlett
Re: color of root@localhost
#16
Moderator
Joined: 2007/10/22
From ~/Earth/UK/England/Suffolk
Posts: 5934
Yes, it's possible to have lots of fun with the escape sequences for changing the video attributes.
_________________
Alan.

100% Unix & Linux. Co-founder of the ELRepo Project.
Posted on: 2008/8/28 12:21
Create PDF from Post Print
Top
 Top   Previous Topic   Next Topic

 


 You cannot start a new topic.
 You can view topic.
 You cannot reply to posts.
 You cannot edit your posts.
 You cannot delete your posts.
 You cannot add new polls.
 You cannot vote in polls.
 You cannot attach files to posts.
 You cannot post without approval.




"Linux" is a registered trademark of Linus Torvalds. | All other trademarks are property of their respective owners. | All other content is Copyright @ 2004-2009 by the CentOS Project or "each individual contributor (forums, comments, etc.) unless otherwise assigned".| Theme based on a theme by 7dana.com