Enhancing the Linux prompt
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!-- saved from url=(0084)file://Y:\knowledgebase\developerWorks%20%20Linux%20%20Tip%20--%20Prompt%20magic.htm --> <!-- saved from url=(0065)http://www-106.ibm.com/developerworks/linux/library/l-tip-prompt/ --><HTML><HEAD><TITLE>developerWorks : Linux : Tip -- Prompt magic</TITLE> <META http-equiv=Content-Type content="text/html; charset=windows-1252"> <META content="shell prompt, xterm title bar, x terminal, x terminal title bar, Linux, operating systems, Linux news, open source, Linux papers, Linux information, Linux articles, Linux whitepapers, IBM" name=KEYWORDS> <META content="Why stick with the standard boring shell prompt when you can easily make it colorful and more informative? In this tip, Daniel Robbins will show you how to get your shell prompt just the way you like it, as well as how to dynamically update your xterm's title bar." name=ABSTRACT> <META content="The Linux zone on the developerWorks Web site is your developer resource for information on Linux, Linux resources, and Linux development." name=DESCRIPTION> <META content=public name=SECURITY> <META content=20000922 name="LAST UPDATED"> <META content="Renee McAteer" name="LAST UPDATED BY"><LINK href="Enhancing the Linux prompt_files/style2.css" type=text/css rel=stylesheet> <SCRIPT language=JavaScript> <!-- function nav_pulldown(list) {top.document.location.href = list.options[list.selectedIndex].value;} function wB(){var br="BR";if((navigator.userAgent.indexOf('Mozilla')!= -1)&&((navigator.userAgent.indexOf('Spoofer')==-1)&&(navigator.userAgent.indexOf('compatible')==-1))){br="NS"}return br} function wV(br){var bv=0;bv=navigator.appVersion.substring(0,1);if(br=="IE"){(parseInt(bv));}if(br=="NS"){(parseInt(bv));}return bv;} function wP(){var os="OS";if(navigator.userAgent.indexOf("OS/2")!=-1){os='os/2'}return os;}b=wB();v=wV(b);o=wP(); function change_bgColor() {if (b=="NS" && v==2 && o != "os/2"){document.bgColor="#999999"}} function gotosite() {var L = document.formSpinbox.pickWW.selectedIndex; location.href = document.formSpinbox.pickWW.options[L].value; return false;} //--> </SCRIPT> <META content="MSHTML 5.50.4522.1800" name=GENERATOR></HEAD> <BODY text=#000000 bgColor=#ffffff onload=change_bgColor()><!-- DO NOT CHANGE THESE INCLUDES --><!-- MASTHEAD --> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0> <TBODY> <TR bgColor=#006699> <TD> <TABLE cellSpacing=0 cellPadding=0 width=300 border=0> <TBODY> <TR bgColor=#006699> <TD width=150><IMG height=25 alt=IBM src="Enhancing the Linux prompt_files/mast_logo.gif" width=150></TD> <TD width=150 background="Enhancing the Linux prompt_files/mgradient.gif"><FONT face="Verdana, sans-serif" color=#99ccff size=-2><B><!--Country--></B></FONT><BR><IMG height=1 alt="" src="Enhancing the Linux prompt_files/c.gif" width=150></TD></TR></TBODY></TABLE></TD> <TD align=left> <TABLE cellSpacing=0 cellPadding=0 width=300 border=0> <TBODY> <TR> <TD width=100><A href="http://www.ibm.com/shop1/"><IMG height=25 alt=Shop src="Enhancing the Linux prompt_files/shopibm.gif" width=100 border=0></A></TD> <TD width=100><A href="http://www.ibm.com/support/"><IMG height=25 alt=Support src="Enhancing the Linux prompt_files/support.gif" width=100 border=0></A></TD> <TD width=100><A href="http://www.ibm.com/download/"><IMG height=25 alt=Downloads src="Enhancing the Linux prompt_files/downloads.gif" width=100 border=0></A></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0> <TBODY> <TR bgColor=#000000> <TD> <TABLE cellSpacing=0 cellPadding=0 width=600 border=0> <TBODY> <TR> <TD width=76 bgColor=#006699><IMG height=21 alt="" src="Enhancing the Linux prompt_files/mast_lnav_sp.gif" width=76></TD> <TD bgColor=#000000 colSpan=4> <TABLE height=21 cellSpacing=0 cellPadding=0 border=0> <TBODY> <TR> <TD class=mast align=middle width=79 bgColor=#000000 height=21><A class=nav style="COLOR: #ffffff" href="http://www.ibm.com/home/">IBM Home</A></TD> <TD width=1 bgColor=#959595><IMG height=1 alt="" src="Enhancing the Linux prompt_files/c.gif" width=1></TD> <TD class=mast align=middle width=74 bgColor=#000000 height=21><A class=nav style="COLOR: #ffffff" href="http://www.ibm.com/products/">Products</A></TD> <TD width=1 bgColor=#959595><IMG height=1 alt="" src="Enhancing the Linux prompt_files/c.gif" width=1></TD> <TD class=mast align=middle width=81 bgColor=#000000 height=21><A class=nav style="COLOR: #ffffff" href="http://www.ibm.com/services/">Consulting</A></TD> <TD width=1 bgColor=#959595><IMG height=1 alt="" src="Enhancing the Linux prompt_files/c.gif" width=1></TD> <TD class=mast align=middle width=81 bgColor=#000000 height=21><A class=nav style="COLOR: #ffffff" href="http://www.ibm.com/solutions/">Industries</A></TD> <TD width=1 bgColor=#959595><IMG height=1 alt="" src="Enhancing the Linux prompt_files/c.gif" width=1></TD> <TD class=mast align=middle width=57 bgColor=#000000 height=21><A class=nav style="COLOR: #ffffff" href="http://www.ibm.com/news/">News</A></TD> <TD width=1 bgColor=#959595><IMG height=1 alt="" src="Enhancing the Linux prompt_files/c.gif" width=1></TD> <TD class=mast align=middle width=78 bgColor=#000000 height=21><A class=nav style="COLOR: #ffffff" href="http://www.ibm.com/ibm/">About IBM</A></TD> <TD width=1 bgColor=#959595><IMG height=1 alt="" src="Enhancing the Linux prompt_files/c.gif" width=1></TD> <TD class=mast align=middle width=74 bgColor=#000000 height=21><A class=nav style="COLOR: #ffffff" target=_blank href="http://www-109.ibm.com/redirectdWPS.htm">Search</A></TD></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0> <TBODY> <TR> <TD width=5 rowSpan=2><SPACER type="block" width="5"></TD> <TD vAlign=top align=left width="100%"> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0> <TBODY> <TR> <TD><NOBR><FONT face="Helvetica, Helv, Arial" size=1><!-- CHANGE include statement --></FONT></NOBR></TD></TR></TBODY></TABLE><!-- 2 of 2 tables for bread crumb trail and blue line gif --> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0> <TBODY> <TR colspan="3"> <TD width=8><!--gutter--><IMG height=1 src="Enhancing the Linux prompt_files/c(1).gif" width=8></TD> <TD><FONT face="Helvetica, Helv, Arial" size=-1><A href="http://www.ibm.com/"><B>IBM</B></A> <B>: </B><A href="http://www-106.ibm.com/developerworks/"><B>developerWorks</B></A> <B>: </B><A href="http://www-105.ibm.com/developerworks/papers.nsf/dw/linux-papers-bytitle?OpenDocument&Count=500"><B>Linux library</B></A> </FONT></TD> <TD width=8><!--gutter--><IMG height=1 src="Enhancing the Linux prompt_files/c(1).gif" width=8></TD></TR> <TR colspan="3"> <TD width=8><!--gutter--><IMG height=1 src="Enhancing the Linux prompt_files/c(1).gif" width=8></TD> <TD width="100%"><!--gutter--><IMG height=1 src="Enhancing the Linux prompt_files/c(1).gif" width=8></TD> <TD width=8><!--gutter--><IMG height=1 src="Enhancing the Linux prompt_files/c(1).gif" width=8></TD></TR> <TR> <TD width=8><!--gutter--><IMG height=1 src="Enhancing the Linux prompt_files/c(1).gif" width=8></TD> <TD><IMG height=3 src="Enhancing the Linux prompt_files/blueline.gif" width="100%" border=0></TD> <TD width=8><!--gutter--><IMG height=1 src="Enhancing the Linux prompt_files/c(1).gif" width=8></TD></TR></TBODY></TABLE></NOBR> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0><!-- Title and PDF Row --> <TBODY> <TR> <TD vAlign=top width=8><!-- gutter --><IMG height=1 src="Enhancing the Linux prompt_files/error-page" width=8> </TD><!-- Formatter, when paper is in folder, change above to ../../images/c.gif --> <TD vAlign=top><!-- PDF Download Table--> <TABLE cellSpacing=0 cellPadding=2 width=137 align=right border=0> <TBODY> <TR vAlign=center> <TD bgColor=#3333cc><FONT face="HELVETICA, HELV, ARIAL" color=#ffffff size=-1 align="center"><B>Download it now!</B></FONT> </TD></TR> <TR bgColor=#cccccc> <TD vAlign=bottom bgColor=#ffffff><FONT face="HELVETICA, HELV, ARIAL" size=-1><A href="ftp://www6.software.ibm.com/software/developer/library/l-tip-prompt.pdf"><B>PDF</B></A></FONT> <FONT face="HELVETICA, HELV, ARIAL" size=-2>(61.5 KB)<BR><A href="http://www.adobe.com/prodindex/acrobat/readstep.html">Free Acrobat™ Reader</A></FONT> </TD></TR></TBODY></TABLE><!-- End PDF Download Table --><!-- TITLE and AUTHOR lines --><BR> <P><STRONG class=title>Tip: Prompt magic</STRONG><BR><STRONG class=subtitle>Enhancing the system prompt</STRONG></P> <P>Daniel Robbins<BR>President-CEO, Gentoo Technologies, Inc.<BR>September 2000</P><!-- END title and author lines --><!-- Begin Table of Contents--> <P> <TABLE width=110 align=right border=0> <TBODY> <TR> <TD align=middle bgColor=#0033cc height=5><FONT face="HELVETICA, HELV, ARIAL" color=#ffffff size=-1><B>Contents:</B></FONT></TD></TR> <TR> <TD class=toc> <A href="http://www-106.ibm.com/developerworks/linux/library/l-tip-prompt/#1">Prompt basics</A></FONT></TD></TR> <TR> <TD class=toc> <A href="http://www-106.ibm.com/developerworks/linux/library/l-tip-prompt/#2">Colorization</A></FONT></TD></TR> <TR> <TD class=toc> <A href="http://www-106.ibm.com/developerworks/linux/library/l-tip-prompt/#3">Xterm fun</A></FONT></TD></TR> <TR> <TD class=toc> <A href="http://www-106.ibm.com/developerworks/linux/library/l-tip-prompt/#resources">Resources</A></FONT></TD></TR> <TR> <TD class=toc> <A href="http://www-106.ibm.com/developerworks/linux/library/l-tip-prompt/#author">About the author</A></FONT></TD></TR> <TR> <TD bgColor=#0033cc height=5><IMG height=1 src="Enhancing the Linux prompt_files/c(1).gif" width=110></TD></TR></TBODY></TABLE></P><!-- End Table of Contents --> <P> <BLOCKQUOTE>Why stick with the standard boring shell prompt when you can easily make it colorful and more informative? In this tip, Daniel Robbins will show you how to get your shell prompt just the way you like it, as well as how to dynamically update your X terminal's title bar. </BLOCKQUOTE> <P></P><BR><BR> <P>As Linux/UNIX people, we spend a lot of time working in the shell, and in many cases, this is what we have staring back at us: </P> <P><A name=""> <TABLE class=code-sample cellPadding=0 width="100%" border=0> <TBODY> <TR> <TD><PRE>bash-2.04$ </PRE></TD></TR></TBODY></TABLE> <P>If you happen to be root, you're entitled to the "prestige" version of this beautiful prompt: </P> <P><A name=""> <TABLE class=code-sample cellPadding=0 width="100%" border=0> <TBODY> <TR> <TD><PRE>bash-2.04# </PRE></TD></TR></TBODY></TABLE> <P>These prompts are not exactly pretty. It's no wonder that several Linux distributions have upgraded their default prompts that add color and additional information to boot. However, even if you happen to have a modern distribution that comes with a nice, colorful prompt, it may not be perfect. Maybe you'd like to add or change some colors, or add (or remove) information from the prompt itself. It isn't hard to design your own colorized, tricked-out prompt from scratch. </P><A name=1> <P><STRONG class=subhead>Prompt basics</STRONG><BR>Under bash, you can set your prompt by changing the value of the PS1 environment variable, as follows:</P> <P> <TABLE class=code-sample cellPadding=0 width="100%" border=0> <TBODY> <TR> <TD><PRE>$ export PS1="> " > </PRE></TD></TR></TBODY></TABLE></P> <P>Changes take effect immediately, and can be made permanent by placing the "export" definition in your ~/.bashrc file. PS1 can contain any amount of plain text that you'd like:</P> <P> <TABLE class=code-sample cellPadding=0 width="100%" border=0> <TBODY> <TR> <TD><PRE>$ export PS1="This is my super prompt > " This is my super prompt > </PRE></TD></TR></TBODY></TABLE></P> <P>While this is, um, interesting, it's not exactly useful to have a prompt that contains lots of static text. Most custom prompts contain information like the current username, working directory, or hostname. These tidbits of information can help you to navigate in your shell universe. For example, the following prompt will display your username and hostname: </P> <P><A name=""> <TABLE class=code-sample cellPadding=0 width="100%" border=0> <TBODY> <TR> <TD><PRE>$ export PS1="\u@\H > " drobbins@freebox > </PRE></TD></TR></TBODY></TABLE> <P>This prompt is especially handy for people who log in to various machines under various, differently-named accounts, since it acts as a reminder of what machine you're actually on and what privileges you currently have. </P> <P>In the above example, we told bash to insert the username and hostname into the prompt by using special backslash-escaped character sequences that bash replaces with specific values when they appear in the PS1 variable. We used the sequences "\u" (for username) and "\H" (for the first part of the hostname). Here's a complete list of all special sequences that bash recognizes (you can find this list in the bash man page, in the "PROMPTING" section): </P> <TABLE cellSpacing=0 cellPadding=5> <TBODY> <TR> <TD><B>Sequence</B></TD> <TD><B>Description</B></TD></TR> <TR> <TD>\a</TD> <TD>The ASCII bell character (you can also type \007)</TD></TR> <TR> <TD>\d</TD> <TD>Date in "Wed Sep 06" format</TD></TR> <TR> <TD>\e</TD> <TD>ASCII escape character (you can also type \033)</TD></TR> <TR> <TD>\h</TD> <TD>First part of hostname (such as "mybox")</TD></TR> <TR> <TD>\H</TD> <TD>Full hostname (such as "mybox.mydomain.com")</TD></TR> <TR> <TD>\j</TD> <TD>The number of processes you've suspended in this shell by hitting ^Z</TD></TR> <TR> <TD>\l</TD> <TD>The name of the shell's terminal device (such as "ttyp4")</TD></TR> <TR> <TD>\n</TD> <TD>Newline</TD></TR> <TR> <TD>\r</TD> <TD>Carriage return</TD></TR> <TR> <TD>\s</TD> <TD>The name of the shell executable (such as "bash")</TD></TR> <TR> <TD>\t</TD> <TD>Time in 24-hour format (such as "23:01:01")</TD></TR> <TR> <TD>\T</TD> <TD>Time in 12-hour format (such as "11:01:01")</TD></TR> <TR> <TD>\@</TD> <TD>Time in 12-hour format with am/pm</TD></TR> <TR> <TD>\u</TD> <TD>Your username</TD></TR> <TR> <TD>\v</TD> <TD>Version of bash (such as 2.04)</TD></TR> <TR> <TD>\V</TD> <TD>Bash version, including patchlevel</TD></TR> <TR> <TD>\w</TD> <TD>Current working directory (such as "/home/drobbins")</TD></TR> <TR> <TD>\W</TD> <TD>The "basename" of the current working directory (such as "drobbins") </TD></TR> <TR> <TD>\!</TD> <TD>Current command's position in the history buffer</TD></TR> <TR> <TD>\#</TD> <TD>Command number (this will count up at each prompt, as long as you type something)</TD></TR> <TR> <TD>\$</TD> <TD>If you are not root, inserts a "$"; if you are root, you get a "#"</TD></TR> <TR> <TD>\xxx</TD> <TD>Inserts an ASCII character based on three-digit number xxx (replace unused digits with zeros, such as "\007")</TD></TR> <TR> <TD>\\</TD> <TD>A backslash</TD></TR> <TR> <TD>\[</TD> <TD>This sequence should appear before a sequence of characters that don't move the cursor (like color escape sequences). This allows bash to calculate word wrapping correctly.</TD></TR> <TR> <TD>\]</TD> <TD>This sequence should appear after a sequence of non-printing characters.</TD></TR></TBODY></TABLE> <P>So, there you have all of bash's special backslashed escape sequences. Play around with them for a bit to get a feel for how they work. After you've done a little testing, it's time to add some color.</P><A name=2> <P><STRONG class=subhead>Colorization</STRONG><BR>Adding color is quite easy; the first step is to design a prompt without color. Then, all we need to do is add special escape sequences that'll be recognized by the terminal (rather than bash) and cause it to display certain parts of the text in color. Standard Linux terminals and X terminals allow you to set the foreground (text) color and the background color, and also enable "bold" characters if so desired. We get eight colors to choose from. </P> <P>Colors are selected by adding special sequences to PS1 -- basically sandwiching numeric values between a "\e[" (escape open-bracket) and an "m". If we specify more than one numeric code, we separate each code with a semicolon. Here's an example color code: </P> <P><A name=""> <TABLE class=code-sample cellPadding=0 width="100%" border=0> <TBODY> <TR> <TD><PRE>"\e[0m" </PRE></TD></TR></TBODY></TABLE> <P>When we specify a zero as a numeric code, it tells the terminal to reset foreground, background, and boldness settings to their default values. You'll want to use this code at the end of your prompt, so that the text that you type in is not colorized. Now, let's take a look at the color codes. Check out this screenshot: </P> <P><B>Color chart</B><BR><IMG height=335 alt="Color chart" src="Enhancing the Linux prompt_files/colortable.gif" width=486 border=0 VALIGN="TOP"></P> <P>To use this chart, find the color you'd like to use, and find the corresponding foreground (30-37) and background (40-47) numbers. For example, if you like green on a normal black background, the numbers are 32 and 40. Then, take your prompt definition and add the appropriate color codes. This: </P> <P><A name=""> <TABLE class=code-sample cellPadding=0 width="100%" border=0> <TBODY> <TR> <TD><PRE>export PS1="\w> " </PRE></TD></TR></TBODY></TABLE> <P>becomes: </P> <P><A name=""> <TABLE class=code-sample cellPadding=0 width="100%" border=0> <TBODY> <TR> <TD><PRE>export PS1="\e[32;40m\w> " </PRE></TD></TR></TBODY></TABLE> <P>So far, so good, but it's not perfect yet. After bash prints the working directory, we need to set the color back to normal with a "\e[0m" sequence: </P> <P><A name=""> <TABLE class=code-sample cellPadding=0 width="100%" border=0> <TBODY> <TR> <TD><PRE>export PS1="\e[32;40m\w> \e[0m" </PRE></TD></TR></TBODY></TABLE> <P>This definition will give you a nice, green prompt, but we still need to add a few finishing touches. We don't need to include the background color setting of 40, since that sets the background to black which is the default color anyway. Also, the green color is quite dim; we can fix this by adding a "1" color code, which enables brighter, bold text. In addition to this change, we need to surround all non-printing characters with special bash escape sequences, "\[" and "\]". These sequences will tell bash that the enclosed characters don't take up any space on the line, which will allow word-wrapping to continue to work properly. Without them, you'll end up with a nice-looking prompt that will mess up the screen if you happen to type in a command that approaches the extreme right of the terminal. Here's our final prompt: </P> <P><A name=""> <TABLE class=code-sample cellPadding=0 width="100%" border=0> <TBODY> <TR> <TD><PRE>export PS1="\[\e[32;1m\]\w> \[\e[0m\]" </PRE></TD></TR></TBODY></TABLE> <P>Don't be afraid to use several colors in the same prompt, like so: </P> <P><A name=""> <TABLE class=code-sample cellPadding=0 width="100%" border=0> <TBODY> <TR> <TD><PRE>export PS1="\[\e[36;1m\]\u@\[\e[32;1m\]\H> \[\e[0m\]" </PRE></TD></TR></TBODY></TABLE><A name=3> <P><STRONG class=subhead>Xterm fun</STRONG><BR>I've shown you how to add information and color to your prompt, but you can do even more. It's possible to add special codes to your prompt that will cause the title bar of your X terminal (such as rxvt or aterm) to be dynamically updated. All you need to do is add the following sequence to your PS1 prompt: </P> <P><A name=""> <TABLE class=code-sample cellPadding=0 width="100%" border=0> <TBODY> <TR> <TD><PRE>"\e]2;titlebar\a" </PRE></TD></TR></TBODY></TABLE> <P>Simply replace the substring "titlebar" with the text that you'd like to have appear in your xterm's title bar, and you're all set! You don't need to use static text; you can also insert bash escape sequences into your titlebar. Check out this example, which places the username, hostname, and current working directory in the titlebar, as well as defining a short, bright green prompt: </P> <P><A name=""> <TABLE class=code-sample cellPadding=0 width="100%" border=0> <TBODY> <TR> <TD><PRE>export PS1="\[\e]2;\u@\H \w\a\e[32;1m\]>\[\e[0m\] " </PRE></TD></TR></TBODY></TABLE> <P>This is the particular prompt that I'm using in the colortable screenshot, above. I love this prompt, because it puts all the information in the title bar rather than in the terminal where it limits how much can fit on a line. By the way, make sure you surround your titlebar sequence with "\[" and "\]", since as far as the terminal is concerned, this sequence is non-printing. The problem with putting lots of information in the title bar is that you will not be able to see info if you are using a non-graphical terminal, such as the system console. To fix this, you may want to add something like this to your .bashrc: </P> <P><A name=""> <TABLE class=code-sample cellPadding=0 width="100%" border=0> <TBODY> <TR> <TD><PRE>if [ "$TERM" = "linux" ] then #we're on the system console or maybe telnetting in export PS1="\[\e[32;1m\]\u@\H > \[\e[0m\]" else #we're not on the console, assume an xterm export PS1="\[\e]2;\u@\H \w\a\e[32;1m\]>\[\e[0m\] " fi </PRE></TD></TR></TBODY></TABLE> <P>This bash conditional statement will dynamically set your prompt based on your current terminal settings. For consistency, you'll want to configure your ~/.bash_profile so that it sources your ~/.bashrc on startup. Make sure the following line is in your ~/.bash_profile: </P> <P><A name=""> <TABLE class=code-sample cellPadding=0 width="100%" border=0> <TBODY> <TR> <TD><PRE>source ~/.bashrc </PRE></TD></TR></TBODY></TABLE> <P>This way, you'll get the same prompt setting whether you start a login or non-login shell. </P> <P>Well, there you have it. Now, have some fun and whip up some nifty colorized prompts!</P><A name=resources> <P><STRONG class=subhead>Resources</STRONG><BR> <UL> <LI><A href="http://www.rxvt.org/">rxvt</A> is a great little xterm that happens to have a good amount of documentation related to escape sequences tucked in the "doc" directory included in the source tarball. <LI><A href="http://aterm.sourceforge.net/">aterm</A> is another terminal program, based on rxvt. It supports several nice visual features, like transparency and tinting. <LI><A href="http://bashish.sourceforge.net/">bashish</A> is a theme engine for all different kinds of terminals. Check out some <A href="http://bashish.sourceforge.net/screenshots/">great screenshots</A> of bashish in action! </LI></UL><A name=author> <P><STRONG class=subhead>About the author</STRONG><BR><!--<img SRC="http://www.ibm.com/developer/i/p-author.jpg" BORDER=0 width=64 height=80 align=LEFT>-->Residing in Albuquerque, New Mexico, Daniel Robbins is the President/CEO of <A href="http://www.gentoo.org/">Gentoo Technologies, Inc.</A>, the creator of <B>Gentoo Linux</B>, an advanced Linux for the PC, and the <B>Portage</B> system, a next-generation ports system for Linux. He has also served as a contributing author for the Macmillan books <I>Caldera OpenLinux Unleashed</I>, <I>SuSE Linux Unleashed</I>, and <I>Samba Unleashed</I>. Daniel has been involved with computers in some fashion since the second grade, when he was first exposed to the Logo programming language as well as a potentially dangerous dose of Pac Man. This probably explains why he has since served as a Lead Graphic Artist at <B>SONY Electronic Publishing/Psygnosis</B>. Daniel enjoys spending time with his wife, Mary, and his new baby daughter, Hadassah. You can contact Daniel at <A href="mailto:drobbins@gentoo.org">drobbins@gentoo.org</A>.</P><!-- End paper --><BR></TD> <TD vAlign=top width=8><!-- gutter--><IMG height=1 src="Enhancing the Linux prompt_files/error-page" width=8> </TD><!-- Formatter, when paper is in folder, change above to ../../images/c.gif --></TR><!-- gutter --> <TR vAlign=top height=8> <TD vAlign=top width=8><!-- gutter --></TD> <TD vAlign=top width=8><!-- gutter --></TD> <TD vAlign=top width=8><!-- gutter --></TD></TR> <TR vAlign=top height=8> <TD vAlign=top width=8><!-- gutter --></TD> <TD vAlign=top width=8><!-- rate article form --> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0> <TBODY> <TR> <TD width="100%" height=1><SPACER type="block" height="1"></TD></TR> <TR> <TD vAlign=top align=left width="100%" bgColor=#3333cc height=3><IMG height=3 src="Enhancing the Linux prompt_files/blueline.gif" width="100%" border=0></TD></TR> <TR vAlign=top> <TD> <FORM action=http://www9.software.ibm.com/dworks/ratings.nsf/RateArticle?CreateDocument method=post><!-- paste title here --><INPUT type=hidden value="Tip: Prompt magic" name=ArticleTitle> <!-- paste zone here --><INPUT type=hidden value=Linux name=Zone> <INPUT type=hidden value=http://www.ibm.com/developer/thankyou/feedback-linux.html name=RedirectURL> <FONT face="HELVETICA, HELV, ARIAL" size=-1><B>What do you think of this article?</B></FONT> <P> <TABLE cellSpacing=0 cellPadding=0 width=580 border=0> <TBODY> <TR vAlign=top> <TD><INPUT type=radio value=5 name=Rating><FONT face="HELVETICA, HELV, ARIAL" size=-1>Killer! (5)</FONT></TD> <TD><INPUT type=radio value=4 name=Rating><FONT face="HELVETICA, HELV, ARIAL" size=-1>Good stuff (4)</FONT></TD> <TD><INPUT type=radio value=3 name=Rating><FONT face="HELVETICA, HELV, ARIAL" size=-1>So-so; not bad (3)</FONT></TD> <TD><INPUT type=radio value=2 name=Rating><FONT face="HELVETICA, HELV, ARIAL" size=-1>Needs work (2)</FONT></TD> <TD><INPUT type=radio value=1 name=Rating><FONT face="HELVETICA, HELV, ARIAL" size=-1>Lame! (1)</FONT></TD></TR></TBODY></TABLE><BR><FONT face="HELVETICA, HELV, ARIAL" size=-1><B>Comments?</B></FONT><BR><TEXTAREA name=Comments rows=3 wrap=virtual cols=52></TEXTAREA> <BR><BR><INPUT type=submit value="Submit feedback"> </FORM></FONT></P></TD></TR></TBODY></TABLE><!-- end rate article form --></TD> <TD vAlign=top width=8><!--gutter--></TD></TR> <TR vAlign=top height=8> <TD vAlign=top width=8><!--gutter--></TD> <TD vAlign=top width=8><!--gutter--></TD> <TD vAlign=top width=8><!--gutter--></TD></TR></TBODY></TABLE><!-- end content --></TD></TR></TBODY></TABLE><!-- FOOTER --> <TABLE cellSpacing=0 cellPadding=0 border=0> <TBODY> <TR> <TD width=150> <TABLE cellSpacing=0 cellPadding=0 width=150 border=0> <TBODY> <TR bgColor=#000000> <TD class=mast width=49><A class=nav style="COLOR: #ffffff" href="http://www.ibm.com/privacy/">Privacy</A></TD> <TD width=1 bgColor=#959595><IMG height=20 alt="" src="Enhancing the Linux prompt_files/c.gif" width=1 border=0></TD> <TD class=mast width=49><A class=nav style="COLOR: #ffffff" href="http://www.ibm.com/legal/">Legal</A></TD> <TD width=1 bgColor=#959595><IMG height=20 alt="" src="Enhancing the Linux prompt_files/c.gif" width=1 border=0></TD> <TD class=mast width=49><A class=nav style="COLOR: #ffffff" href="http://www.ibm.com/contact/">Contact</A></TD> <TD width=1 bgColor=#959595><IMG height=21 alt="" src="Enhancing the Linux prompt_files/c.gif" width=1 border=0></TD></TR> <TR bgColor=#ffffff> <TD width=49><IMG height=1 alt="" src="Enhancing the Linux prompt_files/c.gif" width=49 border=0></TD> <TD width=1><IMG height=1 alt="" src="Enhancing the Linux prompt_files/c.gif" width=1 border=0></TD> <TD width=49><IMG height=1 alt="" src="Enhancing the Linux prompt_files/c.gif" width=49 border=0></TD> <TD width=1><IMG height=1 alt="" src="Enhancing the Linux prompt_files/c.gif" width=1 border=0></TD> <TD width=49><IMG height=1 alt="" src="Enhancing the Linux prompt_files/c.gif" width=49 border=0></TD> <TD width=1><IMG height=1 alt="" src="Enhancing the Linux prompt_files/c.gif" width=1 border=0></TD></TR></TBODY></TABLE></TD> <TD width="100%"> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0> <TBODY> <TR bgColor=#000000> <TD><IMG height=21 alt="" src="Enhancing the Linux prompt_files/c.gif" width=1 border=0></TD></TR> <TR bgColor=#ffffff> <TD><IMG height=1 alt="" src="Enhancing the Linux prompt_files/c.gif" width=1 border=0></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></BODY></HTML>