Linux Bashѧϰ£¨Î壩£ºÉèÖû·¾³
¡¡¡¡±¾ÎÄÒ²¼´¡¶Learning the bash Shell¡·3rd EditionµÄµÚÈýÕÂCustomizing Your EnvironmentÖ®¶ÁÊé±Ê¼Ç£¬µ«ÎÒÃǽ«²»ÏÞÓÚ´Ë¡£ÉèÖÃÒ»¸öºÃµÄÓû§»·¾³£¬¶ÔÎÒÃÇ¿ª·¢ÊǷdz£¹Ø¼üµÄ¡£ÔÚÕâÒ»Õ½ÚÖУ¬´ÓËĸö·½Ãæ½øÐнéÉÜ£ºÌرðµÄÎļþ£¬±ðÃû£¬Ñ¡Ï²ÎÊý¡£
ÌØÊâÎļþ
¡¡¡¡ÔÚÓû§Ä¿Â¼ÏÂÓм¸¸öÌØÊâµÄÎļþ£¬¿ÉÒÔÓÃls -a
À´²é¿´ÕâЩÒþ²ØµÄϵͳÎļþ¡£.bash_profileÖ»ÖØÒªµÄÎļþ£¬¾³£ÓÃÓÚÉèÖÃÓû§»·¾³¡£Õâ¸öÎļþ½«ÔÚÓû§loginµÄʱºòÖ´ÐС£È«¾Ö£¨ËùÓÐÓû§Ê¹Óõģ©Îª/etc/profile¡£Í¨³¤ÎÒÃǽ«ÐµÄÅäÖø½¼ÓÔÚ¸ÃÎļþµÄĩ⣬Ð޸ĺóÐèÒªÖØÐµÇ¼·½²ÅÉúЧ£¬»òÕßʹÓÃsourceÃüÁîÀ´Ö´ÐÐÕâÐ©ÌØÊâÎļþ£¬¼´source .bash_profile
¡£
¡¡¡¡ÏÖÔÚµÄlinuxÒ»°ã¶¼ÊÇʹÓÃ.bash_profile£¬Èç¹ûûÓÐϵͳ»áÈ¥ÕÒ.bash_login£¬´ÎÈ¥ÕÒ.profile¡£ÁíÍ⻹ÓÐ.bashrcÎļþ£¬ÕâʵÔÚµ÷ÓÃsubbashµÄʱºòϵͳִÐеģ¬Ò²¼´ÊÇÎÒÃÇÇÃÈëbash
À´¿ªÆôеÄbash»·¾³£¬ÕâÔÚʵ¼ÊÖÐÊǺÜÉÙÓõġ£.bash_logout¹ËÃû˼Ò壬ÊÇÔÚlogoutÊǵ÷Óá£
±ðÃû
¡¡¡¡ÔÚ»·¾³ÎļþÖУ¬»áÉèÖÃһЩ±ðÃû£¬µ±È»Ò²¿ÉÒÔÔÚÕý³£µÄbashÃüÁîÐÐʹÓá£Í¨¹ý±ðÃû£¬ÎÒÃÇ¿ÉÒÔÓÃÎÒÃDZãÓÚ¼ÇÒä»òÕß¾³£Ê¹ÓÃµÄÆäËû²Ù×÷ϵͳµÄÃüÁîÀ´Ìæ´úlinuxµÄÃüÁҲ¿ÉÒÔ½«ºÜ³¤Ò»´®ÃüÁîÓñȽϼòµ¥µÄµ¥´ÊÀ´Ìæ´ú¡£¸ñʽÈçÏ£º
alias
name
=command
¡¡¡¡Çë×¢ÒâÔÚ“=”µÄǰºóÊDz»ÔÊÐíÁôÓпոñµÄ¡£ÀýÈçÓÃsearchÀ´´úÌæ²éÕÒÃüÁîgrep£¬alias search=grep£¬Èç¹ûcommandÖÐÊǺ¬ÓпոñµÄ£¬ÐèÒªÓÃÒýºÅÀ´±íʾ£¬ÀýÈçalias ls=’ls –color’¡£µ±È»ÎÒÃÇÐèҪעÒâ²»Òª½«Í¨Åä·ûÕâÐ©ÌØÊâ·ûºÅÓÃÓÚname¡£ÎÒÃÇ¿ÉÒÔÔÚcommandÖзÅÈëÒ»¸öÒѾaliasµÄ±ðÃû£¬ÕâÊÇÔÊÐíµÄ¡£bashÊǽûÖ¹loopµÄ£¬Èç¹ûÅöµ½£¬Ëü»áÍ£Ö¹½øÒ»²½·Ò룬ÀýÈçÉÏÃæµÄÀý×Óls×÷Ϊls -color£¬¶øÕâÁ½¸ölsÔÚÂß¼ÉÏ¿ÉÒÔ²úÉúloop£¬µ«bash²»»áÔÊÐíÕâÖÖÇé¿öµÄ·¢Éú¡£ËäÈ»ÕâÑù£¬ÎÒÃÇÒª·ÀÖ¹ÔÚ¶à¸öaliasÉÏ×Ô¼º¸ø×Ô¼ºÉèÖû·»ØÉ趨£¬¼ò½à¡¢ÇåÎú£¬ÊÇÒ»¸ö³ÌÐòÔ±µÄ×¼Ôò¡£
±ðÃûÖ»ÄÜÓÃÓÚÃüÁîÐеĿªÊ¼£¬ÀýÈçalias mywork=’cd /home/wei/project/mywork’£¬ÎÒÃÇǶÈëmywork£¬¾Í¿ÉÒÔÖ±½Ó½øÈëÖ¸¶¨µÄÃüÁµ«ÊÇÎÒÃDz»ÄÜalias mywork=/home/wei/project/mywork£¬È»ºócd mywork£¬±ðÃûÊDz»»áÈ¥½âÎö²»×÷ΪµÚһλµÄÃüÁîµÄ¡£ÕâÖÖÇé¿ö¿ÉÒÔÓÃexportµÄ·½Ê½À´´¦Àí¡£
alias£ºÀýÈ統ǰaliasµÄµÄÁбí
alias name
£ºÀýÈç¸ønameµÄÕæÕýº¬Òå
unalias name
£ºÈ¡Ïû¸ÃnameµÄ±ðÃûÀ¦°ó
ÎÒÃÇ¿ÉÒÔͨ¹ýset –o opti
Ïà¹ØÎĵµ£º
RHEL5ÔÚ°²×°VM-wareTools¹ý³ÌÖгöÏÖÈçÏ´íÎó£º
What is the
location of the directory of C header files that match your running kernel?
[/usr/src/linux/include] The directory of kernel headers (version
2.6.18-8.el5xen) does not match
´Ë´íÎóÖ÷ÒªÊÇÏëÕÒLinuxÄں˵İüº¬Í·ÎļþÕÒ²»µ½¡£Òª½â¾ö´ËÎÊÌâÐèÒª° ......
ºÃ¾Ãûд Blog£¬Ã¦°¡Ê²Ã´µÄ¾Í²»ËµÁË£¬ÀÁÊÇ×î´óµÄÔÒò¡£×î½üæ×ŸøÊµÑéÊÒ×ö¸öÍøÕ¾£¬³ýÁËÎÒÊìϤµÄ Web Design & Development Ö®Í⣬Õâ´ÎÎÒ»¹´î½¨ÁËһ̨ Linux ·þÎñÆ÷¡£Ò»·½ÃæÓÃÀ´·ÅÖÃÎÒÃǵÄÕ¾µã£¬ÁíÒ»·½ÃæÊµÑéÊÒ·Åһ̨·þÎñÆ÷£¬Ò²ÎªÊµÑéÊҵijÉÔ±ÃÇÌṩһЩ¶îÍâµÄ·þÎñ£¬·½±ã¿ÆÑкÍѧϰ¡£
ËäÈ»×ö Web ÎÒÊÇÇá³µÊì·ÁË£¬µ«µ¹Ì ......
ÔÚ±¾ÏµÁÐÐòÖÐ×÷Õ߸ÅÊöÁË linux ½ø³Ì¼äͨÐŵļ¸ÖÖÖ÷ÒªÊֶΡ£ÆäÖйܵÀºÍÓÐÃû¹ÜµÀÊÇ×îÔçµÄ½ø³Ì¼äͨÐÅ»úÖÆÖ®Ò»£¬¹ÜµÀ¿ÉÓÃÓÚ¾ßÓÐÇ×Ôµ¹ØÏµ½ø³Ì¼äµÄͨÐÅ£¬ÓÐÃû¹ÜµÀ¿Ë·þÁ˹ܵÀûÓÐÃû×ÖµÄÏÞÖÆ£¬Òò´Ë£¬³ý¾ßÓйܵÀËù¾ßÓеŦÄÜÍ⣬Ëü»¹ÔÊÐíÎÞÇ×Ôµ¹ØÏµ½ø³Ì¼äµÄͨÐÅ¡£ ÈÏÇå¹ÜµÀºÍÓÐÃû¹ÜµÀµÄ¶Áд¹ ......
ÔÎĵØÖ·£ºhttp://www.eetop.cn/blog/html/40/202640-8862.html
o: ±àÒëµÄÄ¿±êÎļþ
a: ¾²Ì¬¿â£¬Æäʵ¾ÍÊǰÑÈô¸ÉoÎļþ´òÁ˸ö°ü
so: ¶¯Ì¬Á´½Ó¿â£¨¹²Ïí¿â£©
lo: ʹÓÃlibtool±àÒë³öµÄÄ¿±êÎļþ£¬Æäʵ¾ÍÊÇÔÚoÎļþÖÐÌí¼ÓÁËһЩÐÅÏ¢
la: ʹÓÃlibtool±àÒë³öµÄ¿âÎļþ£¬ÆäʵÊǸöÎı¾Îļþ£¬¼Ç¼ͬÃû¶¯Ì¬¿âºÍ¾²Ì¬¿âµÄÏà¹ØÐÅÏ¢
1 lib ......
VimºÍËùÓеÄÁ÷ÐÐÎı¾±à¼Æ÷Ò»Ñù£¬¿ÉÒԺܺõı༸÷ÖÖ×Ö·û±àÂëµÄÎļþ£¬Õ⵱Ȼ°üÀ¨ UCS-2¡¢UTF-8 µÈÁ÷ÐÐµÄ Unicode ±àÂ뷽ʽ¡£¶øÇҺͺܶàÀ´×Ô Linux ÊÀ½çµÄÈí¼þÒ»Ñù£¬ÕâÐèÒªÄã×Ô¼º¶¯ÊÖÉèÖá£
Vim ÓÐËĸö¸ú×Ö·û±àÂ뷽ʽÓйصÄÑ¡Ïencoding ¡¢fileencoding ¡¢fileencodings ¡¢termencoding (ÕâЩѡÏî¿ÉÄܵÄȡֵÇë²Î¿¼ Vim ÔÚ ......