ÉèÖÃLinuxÃüÁîÐÐÌáʾ·û£¬¶¨ÖÆLinuxÌáʾ·û£¬¹©²Î¿¼¡£
Ìáʾ·ûͨ¹ý±äÁ¿PS1À´ÉèÖã¬ÓÃÒÔÏÂÃüÁîÀ´ÏÔʾµ±Ç°ÉèÖãº
echo $PS1
Ìáʾ·ûµÄϵͳ·¶Î§£¨¶ÔϵͳÀïËùÓÐÓû§ÓÐЧ£©µÄÉ趨ÔÚÎļþ /etc/bashrcÀ¿ÉÄÜ°üº¬ÒÔϵÄÐУº
PS=¡°[\u@\h \W]\$"
Òª¶¨ÖÆÌáʾ·û£¬ÎÒÃÇ¿ÉÒÔ±à¼Îļþ /etc/bashrc £¨rootÓû§£©È»ºóÔÚÁ½¸öÒýºÅÖ®ÄÚÊäÈëÈκÎÄãÏëÒªµÄÎı¾¡£ÒÔÏÂÊÇ¿ÉÄÜ»áÓõ½µÄÌرð´úÂ룺
\u - µ±Ç°Óû§Ãû£¨ =$LOGNAME)
\h - ÔËÐÐshellµÄ¼ÆËã»úÃû£¨hostname)
\H - ÍêÕûµÄ¼ÆËã»úÃû
\W - µ±Ç°µÄ¹¤×÷Ŀ¼Ãû
\w - µ±Ç°¹¤×÷Ŀ¼ȫ·¾¶Ãû
\$ - ¶ÔÓÚÆÕͨÓû§ÏÔʾ$£¬¶ÔÓÚ³¬¼¶Óû§ÏÔʾ#
\! - µ±Ç°ÃüÁîµÄÀúÊ·±àºÅ
\# - µ±Ç°ÃüÁî±àºÅ£¨ÔÚµ±Ç°µÄshellÏÂÔËÐеÄÃüÁ
\d - µ±Ç°ÈÕÆÚ
\t - µ±Ç°Ê±¼ä£¨24СʱÖÆ£©
\T - µ±Ç°Ê±¼ä£¨12СʱÖÆ £¬bash 2.0ÓÐЧ
\@ - µ±Ç°Ê±¼ä£¨AM/PM¸ñʽ£©£¬bash 2.0 ÓÐЧ
\s - shellµÄÀàÐÍ
\a - ¸æ¾¯µÄÉùÒô
\j - Óû§µÄÈÎÎñÊý
\n - ÐÂÐÐ
\\ - ·´Ð±¸Ü
\[ - ²»¿É´òÓ¡×Ö·û¿ªÊ¼±êÖ¾
\] - ²»¿É´òÓ¡×Ö·û½áÊø±êÖ¾
\nnn - ASCII×Ö·û¶ÔÓ¦°Ë½øÖÆÊýÖµ
$(date) - dateÃüÁÊä³öµ±Ç°ÈÕÆÚ£©»òÕßÆäËüµÄÃüÁîÊä³ö¡£
411900 ÓÚ 2015-07-29 16:17:09·¢±í:
Õâ¸öͦÓÐÓÃÒ²
aaa0000306 ÓÚ 2014-05-01 02:53:20·¢±í:
ºÜÓÐÓÃ;
badoo ÓÚ 2014-03-27 08:50:09·¢±í:
²»´í
xkin_z ÓÚ 2014-03-26 22:33:43·¢±í:
ÔÞ