Find the answer to your Linux question:
Results 1 to 6 of 6
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    can i change the color of PROMPT ?


    in terminal, color of Prompt 'sandra@magical-castle: ~\ $' is white. its really tough to figure out where it is after executing command.
    screen full of while text and i have to search from where output of last command started.

    i want to change the color of PROMPT. please help !
    thanx in advance.

    sandra

  2. #2
    Banned jan1024188's Avatar
    Join Date
    Jul 2006
    Location
    EU, SLOVENIA
    Posts
    1,549

  3. #3
    Linux Engineer drl's Avatar
    Join Date
    Apr 2006
    Location
    Saint Paul, MN, USA / CentOS, Debian, Slackware, {Free, Open, Net}BSD, Solaris
    Posts
    1,472
    Hi.

    Of the 1M of so Google hits for change color of shell prompt linux, one of the good ones is http://www-128.ibm.com/developerwork.../l-tip-prompt/ which also includes tips on adding text to xterm, etc. title bar.

    Google is your friend ... cheers, drl
    Welcome - get the most out of the forum by reading forum basics and guidelines: click here.
    90% of questions can be answered by using man pages, Quick Search, Advanced Search, Google search, Wikipedia.
    We look forward to helping you with the challenge of the other 10%.
    ( Mn, 2.6.n, AMD-64 3000+, ASUS A8V Deluxe, 1 GB, SATA + IDE, Matrox G400 AGP )

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Newbie birdman's Avatar
    Join Date
    Mar 2006
    Location
    Ireland
    Posts
    141
    Hi,

    The way you do this also depends on what shell you are using, I helped someone out with a ksh question on this before:

    http://www.linuxforums.org/forum/lin...shell-ps1.html

    Bash should be easy enough to research through Google

    Regards

  6. #5
    Linux Engineer drl's Avatar
    Join Date
    Apr 2006
    Location
    Saint Paul, MN, USA / CentOS, Debian, Slackware, {Free, Open, Net}BSD, Solaris
    Posts
    1,472
    Hi.

    Birdman makes a good point.

    The shell is one of the most intimate parts of the computing experience, because you're constantly using it. So you want it to be a good tool that works for you, not you working for it.

    The problem is that we do the customization so infrequently that it's easy to forget how to do things, what special character sequences one must use, etc.

    So I was happy to stumble onto the URL below today. It had some stuff for the tcsh settings that I could use. It has lots of other startup files that one can download as well, e.g. vi, emacs, samba ... cheers, drl

    http://dotfiles.com/
    Welcome - get the most out of the forum by reading forum basics and guidelines: click here.
    90% of questions can be answered by using man pages, Quick Search, Advanced Search, Google search, Wikipedia.
    We look forward to helping you with the challenge of the other 10%.
    ( Mn, 2.6.n, AMD-64 3000+, ASUS A8V Deluxe, 1 GB, SATA + IDE, Matrox G400 AGP )

  7. #6

    Smile thanx !

    -->
    thank you all.
    i changed color of PROMPT.

    special thanx to drl. i downloaded 457dot.bashrc file from the link you posted. its very helpful. it corrects my common mistakes.
    i have folder 'packages'. i wrote 'cd packges' and missed 'a'. but it corrected it. amazing !!

    sandra

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •