Search the web
Sign In
New User? Sign Up
lucknow-lug · Uttar Pradesh Linux Users Group
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Colourful bash prompt and timeout feature   Message List  
Reply | Forward Message #58 of 247 |
Re: Colourful bash prompt and timeout feature

PS1='\[\033[11;31m\]\u@\h\[\033[00m\]:\$'
is not showing the p working directory. So:

PS1='\[\033[11;33m\]\u@\h\w\[\033[00m\]:\$'
shows present working directory (add \w)
example:
user@tuxlover~/works:$


--- In lucknow-lug@yahoogroups.com, anujsingh_1 <no_reply@y...> wrote:
>
> When working on a network with multiple linux boxes it looks confusing
> as all bash prompts look same (colour) and it is fairly easy to
> operate when you the bash prompt is colourful...so how to make it
> colourful?
> Simply you have to add this entry in to your
> /~home/.bashrc
> i.e. in ur home directory open your .bashrc file and add this entry
> #RED
> PS1='\[\033[11;31m\]\u@\h\[\033[00m\]:\$'
>
> #GREEN
> PS1='\[\033[11;32m\]\u@\h\[\033[00m\]:\$'
>
> #ORANGE
> PS1='\[\033[11;33m\]\u@\h\[\033[00m\]:\$'
>
> #BLUE
> PS1='\[\033[11;34m\]\u@\h\[\033[00m\]:\$'
>
> #PURPLE
> PS1='\[\033[11;35m\]\u@\h\[\033[00m\]:\$'
>
> #CYAN
> PS1='\[\033[11;36m\]\u@\h\[\033[00m\]:\$'
>
>
>
> The above line will make your bash shell colourful. (easy to recognize
> when working with many systems ) ...even you can give ur root bash
> some colour. Suppose your server is with a red bash command prompt and
> ur other system is with green or someother colour.
>
> example:-my .bashrc file is
> ______________________________________________________________
> # .bashrc
> # User specific aliases and functions
> # Source global definitions
> if [ -f /etc/bashrc ]; then
> . /etc/bashrc
> PS1='\[\033[11;31m\]\u@\h\[\033[00m\]:\$'
> #Make your terminal to close after a defined period of inactivity
> TMOUT=15
> fi
> _____________________________________________________________
>
>
> Also as a security feature you can add a timeout entry in your .basrc
> which causes your terminal to close after the given n seconds of
> inactivity.
>
> anuj
>







Thu Oct 13, 2005 4:56 pm

anujsingh_1
Offline Offline

Forward
Message #58 of 247 |
Expand Messages Author Sort by Date

When working on a network with multiple linux boxes it looks confusing as all bash prompts look same (colour) and it is fairly easy to operate when you the...
anujsingh_1
Offline
Oct 10, 2005
2:37 pm

PS1='\[\033[11;31m\]\u@\h\[\033[00m\]:\$' is not showing the p working directory. So: PS1='\[\033[11;33m\]\u@\h\w\[\033[00m\]:\$' shows present working...
anujsingh_1
Offline
Oct 13, 2005
6:12 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help