ÉîÈëÃ÷È·Linux³£¼ûÇéÐαäÁ¿
Linux³£ÓÃÇéÐαäÁ¿Ïê½â
ÔÚLinuxϵͳÖУ¬ÇéÐαäÁ¿ÊÇÒ»ÖÖ¿ÉÒÔÓ°Ïì³ÌÐòÔËÐеÄÖµ¡£ÇéÐαäÁ¿´æ´¢ÁËһЩҪº¦ÐÅÏ¢£¬ÀýÈç·¾¶¡¢Óû§Ãû¡¢²Ù×÷ϵͳÀàÐ͵ȡ£±¾ÎĽ«ÏÈÈÝһЩ³£ÓõÄLinuxÇéÐαäÁ¿£¬²¢ÌṩÏêϸµÄ´úÂëʾÀý¡£
PATH
PATHÊÇÒ»¸öºÜÊÇÖ÷ÒªµÄÇéÐαäÁ¿£¬Ëü½ç˵ÁËShellÔÚÄÄЩĿ¼ÏÂËÑË÷¿ÉÖ´ÐÐÎļþ¡£ÔÚPATHÖÐÁгöµÄĿ¼»á°´Ë³Ðò¾ÙÐÐËÑË÷£¬µ±ÄãÊäÈëÒ»¸öÏÂÁîʱ£¬ÏµÍ³»áÔÚÕâЩĿ¼ÖвéÕÒ¶ÔÓ¦µÄ¿ÉÖ´ÐÐÎļþ¡£
ʾÀý´úÂ룺
echo $PATH
µÇ¼ºó¸´ÖÆ
Êä³öʾÀý£º
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
µÇ¼ºó¸´ÖÆ
ÉÏÊöʾÀýÖУ¬PATHÇéÐαäÁ¿°üÀ¨Á˶à¸öĿ¼£¬ÏµÍ³»áƾ֤Õâ¸ö˳Ðò¾ÙÐвéÕÒ¿ÉÖ´ÐÐÎļþ¡£
HOME
HOMEÊÇÄ¿½ñÓû§µÄ¼ÒĿ¼£¬Ò»Ñùƽ³£ÓÃÀ´´æ´¢Óû§µÄСÎÒ˽ÈËÎļþºÍÉèÖᣵ±Óû§µÇ¼ϵͳʱ£¬»á×Ô¶¯Çл»µ½HOMEĿ¼¡£
ʾÀý´úÂ룺
echo $HOME
µÇ¼ºó¸´ÖÆ
Êä³öʾÀý£º
/home/username
µÇ¼ºó¸´ÖÆ
ÕâÀïµÄ”username”ÊÇÄ¿½ñÓû§µÄÏÖÊÊÓû§Ãû¡£
USER
USERÇéÐαäÁ¿°üÀ¨ÁËÄ¿½ñµÇÈÎÃü»§µÄÓû§Ãû¡£
ʾÀý´úÂ룺
echo $USER
µÇ¼ºó¸´ÖÆ
Êä³öʾÀý£º
username
µÇ¼ºó¸´ÖÆ
ÈôÊÇÄ¿½ñµÇÈÎÃü»§ÊÇ”username”£¬ÄÇôÊä³ö¾ÍÊÇ”username”¡£
SHELL
SHELLÇéÐαäÁ¿Ö¸¶¨ÁËÄ¿½ñÓû§ËùʹÓõÄShell³ÌÐò¡£
ʾÀý´úÂ룺
echo $SHELL
µÇ¼ºó¸´ÖÆ
Êä³öʾÀý£º
/bin/bash
µÇ¼ºó¸´ÖÆ
ÉÏÊöʾÀýÅúעĿ½ñÓû§ÕýÔÚʹÓÃbash Shell¡£
LANG
LANGÇéÐαäÁ¿Ö¸¶¨ÁËÄ¿½ñϵͳʹÓõÄÓïÑÔÇéÐΡ£
ʾÀý´úÂ룺
echo $LANG
µÇ¼ºó¸´ÖÆ
Êä³öʾÀý£º
en_US.UTF-8
µÇ¼ºó¸´ÖÆ
Õâ¸öʾÀý˵Ã÷ϵͳʹÓõÄÓïÑÔÇéÐÎÊÇÓ¢ÓÃÀ¹ú£©²¢½ÓÄÉUTF-8±àÂë¡£
×ܽá
LinuxÇéÐαäÁ¿ÔÚϵͳÖÐÆð×ÅÖÁ¹ØÖ÷ÒªµÄ×÷Ó㬿ÉÒÔÓ°Ïì³ÌÐòµÄÔËÐкÍÓû§ÌåÑé¡£ÊìÁ·ÕÆÎÕ³£ÓÃÇéÐαäÁ¿µÄ¼ÄÒåºÍÓ÷¨£¬¿ÉÒÔ×ÊÖúÓû§¸üºÃµØÃ÷ȷϵͳÔËÐлúÖÆ¡£Ï£Íû±¾ÎÄÏÈÈݵÄLinux³£ÓÃÇéÐαäÁ¿ÄܶԶÁÕßÓÐËù×ÊÖú¡£
ÒÔÉϾÍÊǶÔLinux³£ÓÃÇéÐαäÁ¿µÄÏêϸÆÊÎö£¬Ï£Íû¶ÁÕß¿ÉÒÔ´ÓÖлñÒæ¡£
ÒÔÉϾÍÊÇÉîÈëÃ÷È·Linux³£¼ûÇéÐαäÁ¿µÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡