×ðÁú¿­Ê±¹ÙÍøµÇ¼

linuxÇéÐαäÁ¿pathÔÚÄÄ

linuxÇéÐαäÁ¿path´æ´¢ÔÚÓû§µÄÉèÖÃÎļþÖУ¬Í¨³£Î»ÓÚÓû§Ö÷Ŀ¼ÏµÄÒ»¸öÒþ²ØÎļþ£¬ÃûΪ¡°.bashrc¡±»ò¡°.bash_profile¡±£¬ÕâЩÎļþ°üÀ¨ÁËÓû§µÇ¼ʱ¼ÓÔصÄÇéÐαäÁ¿ºÍÆäËûÉèÖÃÐÅÏ¢¡£

±¾½Ì³Ì²Ù×÷ϵͳ£ºLinux5.18.14ϵͳ¡¢Dell G3µçÄÔ¡£

ÔÚ Linux ϵͳÖУ¬ÇéÐαäÁ¿ PATH ´æ´¢ÔÚÓû§µÄÉèÖÃÎļþÖС£ÏêϸÀ´Ëµ£¬Ëüͨ³£Î»ÓÚÓû§Ö÷Ŀ¼ÏµÄÒ»¸öÒþ²ØÎļþ£¬ÃûΪ .bashrc »ò .bash_profile¡£ÕâЩÎļþ°üÀ¨ÁËÓû§µÇ¼ʱ¼ÓÔصÄÇéÐαäÁ¿ºÍÆäËûÉèÖÃÐÅÏ¢¡£

Óû§µÄÉèÖÃÎļþ·¾¶ÈçÏ£º

¹ØÓÚͨË×Óû§£º~/.bashrc »ò ~/.bash_profile

¹ØÓÚ root Óû§£º/root/.bashrc »ò /root/.bash_profile

¿ÉÒÔʹÓÃÎı¾±à¼­Æ÷£¨Èç vi¡¢nano µÈ£©·­¿ªÏìÓ¦µÄÎļþ£¬Éó²éºÍ±à¼­ PATH ÇéÐαäÁ¿¡£Ê¾ÀýÏÂÁîÈçÏ£º

vi ~/.bashrc

µÇ¼ºó¸´ÖÆ

ÔÚ·­¿ªµÄÎļþÖУ¬Äã¿ÉÒÔÕÒµ½ÀàËÆÒÔϵÄÐÐÀ´ÉèÖà PATH ±äÁ¿£º

export PATH=/usr/local/bin:/usr/bin:/bin

µÇ¼ºó¸´ÖÆ

ÕâÊÇÒ»¸ö¼òÆÓµÄʾÀý£¬½«Èý¸ö·¾¶ /usr/local/bin¡¢/usr/bin ºÍ /bin Ìí¼Óµ½ PATH ±äÁ¿ÖС£Äã¿ÉÒÔ°´Ðè±à¼­¸ÃÐУ¬½«ÐèÒªµÄ·¾¶Ìí¼Óµ½ PATH ±äÁ¿ÖУ¬ÓÃðºÅÍÑÀë¡£

±à¼­ÉúÑĺó£¬Ö´ÐÐÒÔÏÂÏÂÁîʹÐÞ¸ÄÉúЧ£º

source ~/.bashrc

µÇ¼ºó¸´ÖÆ

ͨ¹ýÖ´ÐÐÉÏÊö²Ù×÷£¬Äã¿ÉÒÔÔÚÓû§µÄÉèÖÃÎļþÖÐÕÒµ½²¢Ð޸ĠPATH ÇéÐαäÁ¿£¬ÒÔ˳ӦÄãµÄÐèÇó¡£

ÒÔÉϾÍÊÇlinuxÇéÐαäÁ¿pathÔÚÄĵÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

ÃâÔð˵Ã÷£ºÒÔÉÏչʾÄÚÈÝȪԴÓÚÏàÖúýÌå¡¢ÆóÒµ»ú¹¹¡¢ÍøÓÑÌṩ»òÍøÂçÍøÂçÕûÀí£¬°æȨÕùÒéÓë±¾Õ¾Î޹أ¬ÎÄÕÂÉæ¼°¿´·¨Óë¿´·¨²»´ú±í×ðÁú¿­Ê±¹ÙÍøµÇ¼ÂËÓÍ»úÍø¹Ù·½Ì¬¶È£¬Çë¶ÁÕß½ö×ö²Î¿¼¡£±¾ÎĽӴýתÔØ£¬×ªÔØÇë˵Ã÷À´ÓÉ¡£ÈôÄúÒÔΪ±¾ÎÄÇÖÕ¼ÁËÄúµÄ°æȨÐÅÏ¢£¬»òÄú·¢Ã÷¸ÃÄÚÈÝÓÐÈκÎÉæ¼°ÓÐÎ¥¹«µÂ¡¢Ã°·¸Ö´·¨µÈÎ¥·¨ÐÅÏ¢£¬ÇëÄúÁ¬Ã¦ÁªÏµ×ðÁú¿­Ê±¹ÙÍøµÇ¼ʵʱÐÞÕý»òɾ³ý¡£

Ïà¹ØÐÂÎÅ

ÁªÏµ×ðÁú¿­Ê±¹ÙÍøµÇ¼

13452372176

¿É΢ÐÅÔÚÏß×Éѯ

ÊÂÇéʱ¼ä£ºÖÜÒ»ÖÁÖÜÎ壬9:30-18:30£¬½ÚãåÈÕÐÝÏ¢

QR code
ÍøÕ¾µØͼ