¹ØÓÚlinux»·¾³±äÁ¿Îļþ
etc/profile:´ËÎļþΪϵͳµÄÿ¸öÓû§ÉèÖû·¾³ÐÅÏ¢,µ±Óû§µÚÒ»´ÎµÇ¼ʱ,¸ÃÎļþ±»Ö´ÐÐ.
²¢´Ó/etc/profile.dĿ¼µÄÅäÖÃÎļþÖÐËѼ¯shellµÄÉèÖÃ.
/etc/bashrc:Ϊÿһ¸öÔËÐÐbash shellµÄÓû§Ö´ÐдËÎļþ.µ±bash shell±»´ò¿ªÊ±,¸ÃÎļþ±»¶ÁÈ¡.
~/.bash_profile:ÿ¸öÓû§¶¼¿ÉʹÓøÃÎļþÊäÈëרÓÃÓÚ×Ô¼ºÊ¹ÓõÄshellÐÅÏ¢,µ±Óû§µÇ¼ʱ,¸Ã
Îļþ½ö½öÖ´ÐÐÒ»´Î!ĬÈÏÇé¿öÏÂ,ËûÉèÖÃһЩ»·¾³±äÁ¿,Ö´ÐÐÓû§µÄ.bashrcÎļþ.
~/.bashrc:¸ÃÎļþ°üº¬×¨ÓÃÓÚÄãµÄbash shellµÄbashÐÅÏ¢,µ±µÇ¼ʱÒÔ¼°Ã¿´Î´ò¿ªÐµÄshellʱ,¸Ã
¸ÃÎļþ±»¶ÁÈ¡.
~/.bash_logout:µ±Ã¿´ÎÍ˳öϵͳ(Í˳öbash shell)ʱ,Ö´ÐиÃÎļþ.
ÁíÍâ,/etc/profileÖÐÉ趨µÄ±äÁ¿(È«¾Ö)µÄ¿ÉÒÔ×÷ÓÃÓÚÈκÎÓû§,¶ø~/.bashrcµÈÖÐÉ趨µÄ±äÁ¿(¾Ö²¿)Ö»Äܼ̳Ð/etc/profileÖеıäÁ¿,ËûÃÇÊÇ\"¸¸×Ó\"¹Øϵ.
~/.bash_profile Êǽ»»¥Ê½¡¢login ·½Ê½½øÈë bash ÔËÐеÄ
~/.bashrc Êǽ»»¥Ê½ non-login ·½Ê½½øÈë bash ÔËÐеÄ
ͨ³£¶þÕßÉèÖôóÖÂÏàͬ£¬ËùÒÔͨ³£Ç°Õß»áµ÷ÓúóÕß¡£
--------------------------------------------------------------------------------
ÔڵǼLinuxʱҪִÐÐÎļþµÄ¹ý³ÌÈçÏ£º
ÔڸյǼLinuxʱ£¬Ê×ÏÈÆô¶¯ /etc/profile Îļþ£¬È»ºóÔÙÆô¶¯Óû§Ä¿Â¼Ï嵀 ~/.bash_profile¡¢ ~/.bash_login»ò ~/.profileÎļþÖеÄÆäÖÐÒ»¸ö(¸ù¾Ý²»Í¬µÄlinux²Ù×÷ϵͳµÄ²»Í¬£¬ÃüÃû²»Ò»Ñù)£¬
Ö´ÐеÄ˳ÐòΪ£º~/.bash_profile¡¢ ~/.bash_login¡¢ ~/.profile¡£
Èç¹û ~/.bash_profileÎļþ´æÔڵĻ°£¬Ò»°ã»¹»áÖ´ÐÐ ~/.bashrcÎļþ¡£
ÒòΪÔÚ ~/.bash_profileÎļþÖÐÒ»°ã»áÓÐÏÂÃæµÄ´úÂ룺
if [ -f ~/.bashrc ] ; then
. ./bashrc
fi
~/.bashrcÖУ¬Ò»°ã»¹»áÓÐÒÔÏ´úÂ룺
if [ -f /etc/bashrc ] ; then
. /bashrc
fi
ËùÒÔ£¬~/.bashrc»áµ÷Óà /etc/bashrcÎļþ¡£×îºó£¬ÔÚÍ˳öshellʱ£¬»¹»áÖ´ÐÐ ~/.bash_logoutÎļþ¡£
Ö´ÐÐ˳ÐòΪ£º/etc/profile -> (~/.bash_profile | ~/.bash_login | ~/.profile) -> ~/.bashrc -> /etc/bashrc -> ~/.bash_logout
¹ØÓÚ¸÷¸öÎļþµÄ×÷ÓÃÓò£¬ÔÚÍøÉÏÕÒµ½ÁËÒÔÏÂ˵Ã÷£º
£¨1£©/etc/profile£º ´ËÎļþΪϵͳµÄÿ¸öÓû§ÉèÖû·¾³ÐÅÏ¢,µ±Óû§µÚÒ»´ÎµÇ¼ʱ,¸ÃÎļþ±»Ö´ÐÐ. ²¢´Ó/etc/profile.dĿ¼µÄÅäÖÃÎļþÖÐËѼ¯shellµÄÉèÖá£
£¨2£©/etc/bashrc: Ϊÿһ¸öÔËÐÐbash shellµÄÓû§Ö´ÐдËÎļþ.µ±bash shell±»´ò¿ªÊ±,¸ÃÎļþ±»¶ÁÈ¡¡£
£¨3£©~/.bash_profile: ÿ¸öÓû§¶¼¿ÉʹÓøÃÎļþÊäÈëרÓÃÓÚ×Ô¼ºÊ¹ÓõÄshell
Ïà¹ØÎĵµ£º
LinuxÖж¨Ê±Æ÷µÄË㷨ʵÏÖ
¶¨Ê±Æ÷µÄ×÷ÓÃ
¶¨Ê±Æ÷ÔÚ²Ù×÷ϵͳÖÐÆðµ½Á˾Ù×ãÇáÖصÄ×÷Óá£ÔÚ×öIO²Ù×÷ʱ£¬ÐèÒª³¬Ê±»úÖƱ£Ö¤ÈÎÎñ²»´¦ÓÚÎÞÐÝÖ¹µÄµÈ´ý״̬£»ÔÚÑÓʱ´¦Àíʱ£¬¿ÉÒÔͨ¹ý“Äֱ픽øÐÐÏà¶Ô×¼µãµÄ»½ÐѲÙ×÷¡£ÔÚ¶àÈÎÎñ²Ù×÷ϵͳÖУ¬¶¨Ê±Æ÷ÊÇÒ»Öַdz£³£ÓõÄ×ÊÔ´¡£
¶ÔÓÚÊìϤӲ¼þ ......
linuxÊÇÒ»¸ö¸´ÔÓµÄÈí¼þϵͳ£¬ÆäÄÚºËÔ´´úÂëÍùÍù»áÓõ½Ò»Ð©ÔÚÓ¦ÓóÌÐòÉè¼ÆÖв¿³£¼ûÓïÑԳɷֺͱà³Ì¼¼ÇÉ£¬ÕâЩ¶¼ÊÇ·ÖÎöÄÚºËÔ´´úÂëµÄ»ù±¾¹¦£¬Ï£Íû´ó¼ÒÄÜÖصãÕÆÎÕ¡£
Ê×ÏÈ£¬gcc±àÒëÆ÷´ÓÓïÑÔÀïÎüÊÕÁË“inline”ºÍ“const”¡£inlineº¯ÊýµÄ´óÁ¿Ê¹Óã¬ÓÐÀûÓÚÌá¸ßÔËÐ ......
2.2 ¹¹½¨ARM Linux½»²æ±àÒ빤¾ßÁ´
¹¹½¨½»²æ±àÒëÆ÷µÄµÚÒ»¸ö²½Öè¾ÍÊÇÈ·¶¨Ä¿±êƽ̨¡£ÔÚGNUϵͳÖУ¬Ã¿¸öÄ¿±êƽ̨¶¼ÓÐÒ»¸öÃ÷È·µÄ¸ñʽ£¬ÕâЩÐÅÏ¢ÓÃÓÚÔÚ¹¹½¨¹ý³ÌÖÐʶ±ðҪʹÓõIJ»Í¬¹¤¾ßµÄÕýÈ·°æ±¾¡£Òò´Ë£¬µ±ÔÚÒ»¸öÌض¨Ä¿±ê»úÏÂÔËÐÐGCCʱ£¬GCC±ãÔÚĿ¼·¾¶ÖвéÕÒ°üº¬¸ÃÄ¿±ê¹æ·¶µÄÓ¦ÓóÌÐò·¾¶¡£GNUµÄÄ¿±ê¹æ·¶¸ñʽΪCPU-PLATF ......
ÒòΪ×Ô¼ºµÄɵ£¬ËùÒÔ²ÅÓеĴËƪÈÕÖ¾¡£Ò²ÐíÓÐÈË¿ÉÒÔ·¢ÏÖ£¬ÔÚÎÒ²©¿ÍÉÏÒѾÓÐƪÃûΪ“LFSÅäÖÃIP¼°°²×°OpenSSH”£¬¶øÔÙдÕâƪÈÕ¼ÇÊÇÒòΪ×Ô¼ºÔÚLinuxÏÂʹÓÃÁ˹âÅÌÀïµÄOpenSSH£¬È»ºó×°ÉϺóʹÓÃ×Ô¼ºÓ²ÅÌÉϵÄSSHʱÀÏÊÇÌáʾÒѾռÓ㬽á¹û·´¸´×°Á˺ü¸±é²ÅÒâʶµ½Õâ¸öÎÊÌ⣡~Õâ¾ÍºÃ±ÈÒ»¸öÈËÆïÔÚÂíÉÏÊýÂíµÄÊýÄ¿Ò»Ñù£¬×ÜÊÇÉÙÒ» ......