ºìÁªLinuxÃÅ»§
Linux°ïÖú

FreeBSDѧϰ±Ê¼Ç-Tcsh µÄ»·¾³É趨

·¢²¼Ê±¼ä:2007-02-13 00:30:12À´Ô´:ºìÁª×÷Õß:Oersted
Tcsh µÄ»·¾³É趨
µÇÈëϵͳºó£¬Äú»á·¢ÏÖÔÚ¹â±ê֮ǰÓÐÒ»¸ö¾®×ֺŠ"#"£¬Õâ¸ö¾®×ÖºÅÎÒÃdzÆ֮ΪÌáʾ·ûºÅ (prompt)¡£ÔÚ tcsh ¼° csh ÖУ¬µ±ÒÔ root µÇÈëʱ£¬Ô¤ÉèµÄÌáʾ·ûºÅÊÇ "#"£¬¶øÒÔÒ»°ãʹÓÃÕßµÇÈëʱ£¬Ìáʾ·ûºÅΪ "%"¡£
FreeBSD °²×°ºÃºó£¬ÎÒÃDZØÐë×öһЩÉ趨Èà FreeBSD ʹÓÃÆðÀ´¸ü˳ÊÖ¡£ÔÚÔ¤ÉèµÄ¿ö×´Ï£¬ÏµÍ³²¢²»Ö§³ÖÖÐÎÄÎļþÃû£¬¶ÔÓÚʹÓÃÖÐÎĵÄÈ˲»Ì«·½±ã¡£ÁíÍ⣬ÃüÁîÁÐÌáʾ·ûºÅµÄÑù×ÓÒ²²»·ûºÏÎÒÃǵÄÐèÇó¡£Èç¹ûÄãÏëÒª¿ÍÖÆ»¯Ò»Ð©Ö¸ÁҲ¿ÉÒÔÔÚÕâÀï¼ÓÉÏÈ¥¡£ËùÒÔÔÚ¿ªÊ¼½øÐÐÆäËüÉ趨֮ǰ£¬ÎÒÃÇÏȽ¨Á¢Ò»¸öÁ¼ºÃµÄʹÓû·¾³¡£
ÔÚʹÓÃÕßµÇÈëºó£¬Tcsh »áÏÈÈ¥¶ÁÈ¡ /etc/csh.cshrc ¼° /etc/csh.login µÄÉ趨£¬½Ó×Å»á¶ÁÈ¡¸ÃʹÓÃÕß¼ÒĿ¼Ï嵀 .cshrc ¼° .login¡£Òò´Ë£¬ÎÒÃÇ¿ÉÒÔ¾­ÓÉÉ趨Õ⼸¸öµµ°¸ÈÃÉ趨ʹÓÃÕßÒ»µÇÈëʱ¾ÍÉúЧ¡£
Ê×Ïȱ༭ /etc/csh.cshrc ¼ÓÈëÏÂÁÐÉ趨£º
setenv EDITOR ee
alias ls ls -F
set prompt = "%B%m [%~] -%n-> "
µÚÒ»ÐÐÉ趨Êǽ«Ô¤ÉèµÄÎÄÊé±à¼­Æ÷¸Ä³É ee¡£µÚ¶þÐÐÊÇÒª½«Ö¸Áî ls ±ä³É ls -F£¬¾ÍÊÇÿ´Î´ò ls ʱ£¬ÏµÍ³»á³öÏÖ ls -F µÄЧ¹û¡£¶øµÚÈýÐÐÊǽ«ÃüÁîÁеÄÌáʾ·ûºÅ¸Ä³ÉÏÂÃæÕâÑù£º
mydomain [/home/john] -john->
¾ÍÊÇ¿ªÍ·ÊÇ»úÆ÷Ãû³Æ£¬ÔÙÀ´ÊÇ·¾¶Ãû³Æ£¬×îºóÊÇʹÓÃÕßÃû³Æ¡£ÐÞ¸ÄÍê csh.cshrc »ò ~/.cshrc ºó£¬Äú±ØÐë×¢ÏúÔÙµÇÈë²Å»á¿´µ½Ð޸ĺóµÄЧ¹û¡£»òÕߣ¬ÄúÒ²¿ÉÒÔʹÓÃÏÂÁÐÖ¸ÁîÀ´ÈÃÐÞ¸ÄÁ¢¼´ÉúЧ£º
# source ~/.cshrc
ÓÉÓÚÔÚ /etc Ï嵀 csh.cshrc ÊÇͨÓõÄÉ趨£¬µ«Èç¹ûʹÓÃÕß×Ô¼ºµÄÉ趨ºÍͨÓÃÉ趨һÑùʱ£¬»áÒÔʹÓÃÕßµÄÉ趨ΪÖ÷¡£ÀýÈ磬ÔÚÒ»°ãʹÓÃÕߵļÒĿ¼Ï嵀 .cshrc Ò²ÓÐÒ»Ðб༭Æ÷µÄÉ趨£¬µ±É趨²»Í¬Ê±£¬»áÒÔʹÓÃÕßĿ¼ÏµÄÉ趨ΪÖ÷¡£Òò´Ë£¬ÎÒÃDZØÐëÔٱ༭ ~/.cshrc£¬½« EDITOR ´Ó vi ¸Ä ee£¬Èç´ËÒ»À´É趨²Å»áÉúЧ¡£
Èç¹ûÄúÏ£ÍûÈÕºóÿ¸öÐÂÔöµÄʹÓÃÕßµÄÉ趨¶¼ÊÇÕâÑù£¬Ôò±ØÐëÐÞ¸Ä /usr/share/skel/dot.cshrc µµ°¸£¬¸ÃµµÄÚÈݵÄÐ޸ĺÍÐÞ¸Ä ~/.cshrc Ò»Ñù£¬°Ñ vi »»³É ee £¬²¢¼ÓÈë ¡¸alias ls ls -F¡¹¡£ÒòΪÔÚʹÓà adduser Ö¸ÁîÐÂÔöʹÓÃÕßʱ£¬Ëü»áÎÊÄãÊÇ·ñÒª½« /usr/share/skel/dot.file ¸´ÖƵ½Ê¹ÓÃÕßĿ¼Ï£¬Òò´ËÎÒÃǾÍÐÞ¸ÄÕâÀÈÃÈÕºóÐÂÔöʹÓÃÕßʱÄÜʹÓøÃÉ趨¡£
/etc/csh.cshrc ºÍ /etc/csh.login µÄ²î±ðÔÚÓÚÈç¹ûÊÇʹÓÃÕßµÇÈ룬¶þ¸öµµ°¸¶¼»á±»Ö´ÐУ¬Èç¹ûÊÇ scripts ÔòÖ»»áÈ¥¶ÁÈ¡ csh.cshrc¡£ÎÒÃǽÓÏÂÀ´ÒªÈÃʹÓÃÕßµÇÈëºó¿ÉÒÔÖ§³ÖÖÐÎÄµÄ console »·¾³£¬ËùÒÔÎÒÃDZ༭ /etc/csh.login ²¢ÔÚ×îºóÃæ¼ÓÈëÒÔϵÄÉ趨£º
# Ö§³ÖÖÐÎĵĻ·¾³£¬ÈÃÎÒÃÇ¿ÉÒÔÔÚ console Ï»ò telnet ÖÐʹÓÃÖÐÎÄ¡£
setenv LANG zh_TW.Big5
ÉÏÊöµÄ»·¾³±äÁ¿É趨»áÔÚʹÓÃÕßµÇÈëʱ×Ô¶¯±»¼ÓÔØ£¬Ò»Ð©³ÌÐò (ÀýÈç date) »á×Ô¶¯¶ÁÈ¡ÕâЩ±äÁ¿£¬²¢²úÉúÖÐÎĵÄѶϢ¡£
ÎÄÕÂÆÀÂÛ

¹²ÓÐ 0 ÌõÆÀÂÛ