尊龙凯时人生就是博

ÔõÑùÉèÖúÍÖÎÀíLinuxÇéÐαäÁ¿

ÔõÑùÉèÖúÍÖÎÀíLinuxÇéÐαäÁ¿ £¬ÐèÒªÏêϸ´úÂëʾÀý

ÔÚLinux²Ù×÷ϵͳÖÐ £¬ÇéÐαäÁ¿ÊÇÔÚ²Ù×÷ϵͳÖд洢µÄ¶¯Ì¬Öµ £¬ËüÃÇÓÃÀ´¿ØÖÆÖÖÖÖ³ÌÐòµÄÐÐΪºÍÊä³ö¡£ÉèÖúÍÖÎÀíÇéÐαäÁ¿ÔÚLinuxϵͳÖÐÊǺÜÊÇÖ÷ÒªµÄ £¬±¾ÎĽ«ÏÈÈÝÔõÑùÉèÖúÍÖÎÀíLinuxÇéÐαäÁ¿ £¬²¢¸½´øÏêϸµÄ´úÂëʾÀý¡£

Éó²éÇéÐαäÁ¿

ÔÚLinuxϵͳÖÐ £¬ÎÒÃÇ¿ÉÒÔͨ¹ýecho $VARIABLE_NAMEÏÂÁîÀ´Éó²éÇéÐαäÁ¿µÄÖµ £¬ºÃ±ÈÉó²éPATHÇéÐαäÁ¿µÄÖµ¿ÉÒÔʹÓÃecho $PATHÏÂÁî¡£

ÉèÖÃÔÝʱÇéÐαäÁ¿

ÒªÉèÖÃÔÝʱÇéÐαäÁ¿ £¬¿ÉÒÔʹÓÃexportÏÂÁî £¬ÀýÈ磺

export VARIABLE_NAME=value

µÇ¼ºó¸´ÖÆ µÇ¼ºó¸´ÖÆ

ÕâÀïVARIABLE_NAMEÊÇÇéÐαäÁ¿µÄÃû³Æ £¬valueÊÇÇéÐαäÁ¿µÄÖµ¡£ÉèÖÃÍêºó £¬¸ÃÇéÐαäÁ¿Ö»ÔÚÄ¿½ñ»á»°ÖÐÓÐÓá£

ÉèÖÃÓÀÊÀÇéÐαäÁ¿

ÒªÉèÖÃÓÀÊÀÇéÐαäÁ¿ £¬¿ÉÒԱ༭/etc/profile¡¢~/.bashrc»ò~/.bash_profileµÈÎļþ £¬Ìí¼ÓÈçÏÂÄÚÈÝ£º

export VARIABLE_NAME=value

µÇ¼ºó¸´ÖÆ µÇ¼ºó¸´ÖÆ

È»ºóÔËÐÐsource /etc/profile»òsource ~/.bashrcʹÇéÐαäÁ¿ÉúЧ¡£

ÖÎÀíÇéÐαäÁ¿

¿ÉÒÔͨ¹ýunsetÏÂÁîÀ´É¾³ýÒÑÓеÄÇéÐαäÁ¿ £¬ÀýÈ磺

unset VARIABLE_NAME

µÇ¼ºó¸´ÖÆ

Õ⽫ɾ³ýÃûΪVARIABLE_NAMEµÄÇéÐαäÁ¿¡£

ʾÀý

ÏÂÃæÊÇÒ»¸öÏêϸµÄʾÀý £¬ÑÝʾÔõÑùÉèÖÃÒ»¸öÃûΪMY_VARIABLEֵΪhelloµÄÇéÐαäÁ¿£º

export MY_VARIABLE=hello
echo $MY_VARIABLE

µÇ¼ºó¸´ÖÆ

ÔËÐÐÉÏÊö´úÂëºó £¬ÈôÊÇûÓб¨´í £¬¾ÍÌåÏÖÀÖ³ÉÉèÖÃÁËÇéÐαäÁ¿MY_VARIABLEµÄֵΪhello £¬²¢ÇÒͨ¹ýecho $MY_VARIABLE¿ÉÒÔÑéÖ¤ÇéÐαäÁ¿µÄÖµ¡£

ͨ¹ýÒÔÉÏ°ì·¨ £¬Äú¿ÉÒÔÇáËÉÉèÖúÍÖÎÀíLinuxÇéÐαäÁ¿¡£¼ÇµÃҪƾ֤×Ô¼ºµÄÐèÇóÑ¡ÔñÔÝʱ»òÓÀÊÀÉèÖÃÇéÐαäÁ¿µÄ·½·¨ £¬²¢ÊµÊ±ÑéÖ¤ÇéÐαäÁ¿ÉèÖÃÊÇ·ñÀֳɡ£Ï£ÍûÒÔÉÏÄÚÈݶÔÄúÓÐËù×ÊÖú¡£

ÒÔÉϾÍÊÇÔõÑùÉèÖúÍÖÎÀíLinuxÇéÐαäÁ¿µÄÏêϸÄÚÈÝ £¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

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

Ïà¹ØÐÂÎÅ

ÁªÏµ尊龙凯时人生就是博

13452372176

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

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

QR code
sitemap¡¢ÍøÕ¾µØͼ