{"id":15303,"date":"2023-06-29T04:04:22","date_gmt":"2023-06-28T20:04:22","guid":{"rendered":"https:\/\/www.linuxcool.com\/lhjblmlzyysy"},"modified":"2023-06-29T04:04:22","modified_gmt":"2023-06-28T20:04:22","slug":"lhjblmlzyysy","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/lhjblmlzyysy","title":{"rendered":"Linux\u73af\u5883\u53d8\u91cf\u547d\u4ee4\uff1a\u4f5c\u7528\u4e0e\u4f7f\u7528\u65b9\u6cd5\u4e00\u89c8"},"content":{"rendered":"<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>**\u6982\u62ec\uff1a**\u672c\u6587\u5c06\u8be6\u7ec6\u8ba8\u8bba<a style='color:#0000CC' href='https:\/\/www.linuxprobe.com\/' target='_blank' rel=\"noopener\">Linux<\/a>\u73af\u5883\u53d8\u91cf<a style='color:#0000CC' href='https:\/\/www.linuxcool.com\/' target='_blank' rel=\"noopener\">\u547d\u4ee4<\/a>\uff0c\u4ee5\u53ca\u6211\u4e2a\u4eba\u5728\u4f7f\u7528\u8fd9\u4e9b\u547d\u4ee4\u65f6\u7684\u4eb2\u8eab\u611f\u53d7\u3002\u6211\u4eec\u5c06\u4ece\u516b\u4e2a\u65b9\u9762\u9010\u6b65\u5206\u6790\u8fd9\u4e9b\u547d\u4ee4\u7684\u4f5c\u7528\u548c\u4f7f\u7528\u65b9\u6cd5\uff0c\u5e76\u901a\u8fc7\u5177\u4f53\u6848\u4f8b\u5c55\u793a\u5176\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\u7684\u91cd\u8981\u6027\u548c\u7075\u6d3b\u6027\u3002<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>**1.\u7b80\u4ecb**<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>\u5728Linux<a style='color:#0000CC' href='https:\/\/www.linuxdown.com\/' target='_blank' rel=\"noopener\">\u7cfb\u7edf<\/a>\u4e2d\uff0c\u73af\u5883\u53d8\u91cf\u662f\u4e00\u79cd\u80fd\u591f\u5f71\u54cd\u7cfb\u7edf\u884c\u4e3a\u548c\u7a0b\u5e8f\u8fd0\u884c\u7684\u914d\u7f6e\u53c2\u6570\u3002\u901a\u8fc7\u8bbe\u7f6e\u73af\u5883\u53d8\u91cf\uff0c\u6211\u4eec\u53ef\u4ee5\u4fee\u6539\u7cfb\u7edf\u7684\u9ed8\u8ba4\u884c\u4e3a\uff0c\u5b9a\u5236\u81ea\u5df1\u7684\u5de5\u4f5c\u73af\u5883\u3002Linux\u63d0\u4f9b\u4e86\u4e00\u7cfb\u5217\u547d\u4ee4\u6765\u7ba1\u7406\u548c\u64cd\u4f5c\u73af\u5883\u53d8\u91cf<strong>linux \u73af\u5883\u53d8\u91cf\u547d\u4ee4<\/strong>\uff0c\u5305\u62ec\u67e5\u770b\u5f53\u524d\u73af\u5883\u53d8\u91cf\u3001\u6dfb\u52a0\u65b0\u7684\u73af\u5883\u53d8\u91cf\u3001\u4fee\u6539\u5df2\u5b58\u5728\u7684\u73af\u5883\u53d8\u91cf\u7b49\u3002<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>**2.\u67e5\u770b\u5f53\u524d\u73af\u5883\u53d8\u91cf**<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'><b>echo\u547d\u4ee4\u662f\u67e5\u770b\u5f53\u524d\u73af\u5883\u53d8\u91cf\u7684\u5e38\u7528\u5de5\u5177\u3002\u901a\u8fc7\u6267\u884c&#8221;echo $\u53d8\u91cf\u540d&#8221;\uff0c\u6211\u4eec\u53ef\u4ee5\u83b7\u53d6\u6307\u5b9a\u73af\u5883\u53d8\u91cf\u7684\u503c\u3002\u4f8b\u5982\uff0c\u6267\u884c&#8221;echo $PATH&#8221;\u53ef\u4ee5\u663e\u793a\u5f53\u524d\u7cfb\u7edf\u7684\u8def\u5f84\u641c\u7d22\u5217\u8868\u3002<\/b><\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>**3.\u6dfb\u52a0\u65b0\u7684\u73af\u5883\u53d8\u91cf**<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'><img style='max-height:350px;max-width:80%;margin: 10px auto' src='https:\/\/www.linuxcool.com\/wp-content\/uploads\/2023\/06\/1687982662856_0.webp' alt='linux\u547d\u4ee4windows\u547d\u4ee4_\u4fee\u6539linux\u7684\u73af\u5883\u53d8\u91cf_linux \u73af\u5883\u53d8\u91cf\u547d\u4ee4' \/><\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'><b>\u8981\u6dfb\u52a0\u4e00\u4e2a\u65b0\u7684\u73af\u5883\u53d8\u91cf\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528export\u547d\u4ee4\u3002\u4f8b\u5982\uff0c\u6267\u884c&#8221;export MY_VAR=hello&#8221;\u5c31\u4f1a\u521b\u5efa\u4e00\u4e2a\u540d\u4e3aMY_VAR\u7684\u65b0\u73af\u5883\u53d8\u91cf\uff0c\u5e76\u5c06\u5176\u503c\u8bbe\u7f6e\u4e3a&#8221;hello&#8221;\u3002<\/b><\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>**4.\u4fee\u6539\u5df2\u5b58\u5728\u7684\u73af\u5883\u53d8\u91cf**<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'><b>\u5982\u679c\u6211\u4eec\u60f3\u4fee\u6539\u5df2\u5b58\u5728\u7684\u73af\u5883\u53d8\u91cf\uff0c\u53ef\u4ee5\u4f7f\u7528export\u547d\u4ee4\u91cd\u65b0\u8d4b\u503c\u3002\u4f8b\u5982\uff0c\u6267\u884c&#8221;export PATH=$PATH:\/new\/path&#8221;\u5c06\u5728\u73b0\u6709\u7684\u8def\u5f84\u641c\u7d22\u5217\u8868\u540e\u6dfb\u52a0\u4e00\u4e2a\u65b0\u7684\u8def\u5f84\u3002<\/b><\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>**5.\u6c38\u4e45\u751f\u6548\u7684\u73af\u5883\u53d8\u91cf**<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'><b>\u4e3a\u4e86\u8ba9\u73af\u5883\u53d8\u91cf\u6c38\u4e45\u751f\u6548\uff0c\u6211\u4eec\u9700\u8981\u5c06\u5176\u6dfb\u52a0\u5230\u914d\u7f6e\u6587\u4ef6\u4e2d\u3002\u5728\u5927\u591a\u6570Linux\u53d1\u884c\u7248\u4e2d\uff0c.bashrc\u6216.bash_profile\u662f\u5b58\u50a8\u7528\u6237\u81ea\u5b9a\u4e49\u914d\u7f6e\u7684\u6587\u4ef6\u3002\u901a\u8fc7\u7f16\u8f91\u8fd9\u4e9b\u6587\u4ef6\u5e76\u6dfb\u52a0\u76f8\u5e94\u7684export\u8bed\u53e5linux\u64cd\u4f5c\u7cfb\u7edf\u6559\u7a0b\uff0c\u6211\u4eec\u53ef\u4ee5\u5b9e\u73b0\u73af\u5883\u53d8\u91cf\u7684\u6c38\u4e45\u751f\u6548\u3002<\/b><\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>**6.\u73af\u5883\u53d8\u91cf\u7684\u4f18\u5148\u7ea7**<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>\u5f53\u7cfb\u7edf\u4e2d\u5b58\u5728\u591a\u4e2a\u540c\u540d\u73af\u5883\u53d8\u91cf\u65f6\uff0c\u7cfb\u7edf\u4f1a\u6309\u7167\u4e00\u5b9a\u7684\u4f18\u5148\u7ea7\u6765\u786e\u5b9a\u4f7f\u7528\u54ea\u4e2a\u503c\u3002\u4e00\u822c\u60c5\u51b5\u4e0b\uff0c\u7528\u6237\u81ea\u5b9a\u4e49\u7684\u73af\u5883\u53d8\u91cf\u4f1a\u4f18\u5148\u4e8e\u7cfb\u7edf\u9ed8\u8ba4\u503c\u3002\u901a\u8fc7\u4e86\u89e3\u4f18\u5148\u7ea7\u89c4\u5219linux\u5e38\u7528\u547d\u4ee4\uff0c\u6211\u4eec\u53ef\u4ee5\u7075\u6d3b\u5730\u63a7\u5236\u5404\u4e2a\u73af\u5883\u53d8\u91cf\u7684\u884c\u4e3a\u3002<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>**7.\u73af\u5883\u53d8\u91cf\u7684\u5b9e\u9645\u5e94\u7528**<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'><b>\u73af\u5883\u53d8\u91cf\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\u5177\u6709\u5e7f\u6cdb\u7684\u7528\u9014\u3002\u6bd4\u5982\uff0c\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u8bbe\u7f6eLD_LIBRARY_PATH\u6765\u6307\u5b9a\u7a0b\u5e8f\u8fd0\u884c\u65f6\u7684\u52a8\u6001\u94fe\u63a5\u5e93\u641c\u7d22\u8def\u5f84\uff1b\u901a\u8fc7\u8bbe\u7f6eLANG\u6765\u6539\u53d8\u7cfb\u7edf\u8bed\u8a00\uff1b\u901a\u8fc7\u8bbe\u7f6ePS1\u6765\u81ea\u5b9a\u4e49\u547d\u4ee4\u884c\u63d0\u793a\u7b26\u7b49\u7b49\u3002\u8fd9\u4e9b\u5b9e\u9645\u6848\u4f8b\u5c06\u5e2e\u52a9\u8bfb\u8005\u66f4\u597d\u5730\u7406\u89e3\u73af\u5883\u53d8\u91cf\u7684\u4f5c\u7528\u548c\u7528\u6cd5\u3002<\/b><\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>**8.\u603b\u7ed3**<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>\u901a\u8fc7\u672c\u6587\u7684\u8ba8\u8bba<strong>linux \u73af\u5883\u53d8\u91cf\u547d\u4ee4<\/strong>\uff0c\u6211\u4eec\u4e86\u89e3\u4e86Linux\u73af\u5883\u53d8\u91cf\u547d\u4ee4\u7684\u57fa\u672c\u6982\u5ff5\u3001\u4f7f\u7528\u65b9\u6cd5\u548c\u5b9e\u9645\u5e94\u7528\u3002\u73af\u5883\u53d8\u91cf\u662f\u8c03\u6574\u7cfb\u7edf\u914d\u7f6e\u7684\u91cd\u8981\u5de5\u5177\uff0c\u80fd\u591f\u5e2e\u52a9\u6211\u4eec\u4e2a\u6027\u5316\u5b9a\u5236\u7cfb\u7edf\u73af\u5883\uff0c\u63d0\u9ad8\u5de5\u4f5c\u6548\u7387\u3002\u638c\u63e1\u8fd9\u4e9b\u547d\u4ee4\uff0c\u5c06\u6709\u52a9\u4e8e\u6211\u4eec\u66f4\u597d\u5730\u7406\u89e3\u548c\u5229\u7528Linux\u64cd\u4f5c\u7cfb\u7edf\u3002<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>\u81f3\u6b64\uff0c\u6211\u4eec\u5bf9Linux\u73af\u5883\u53d8\u91cf\u547d\u4ee4\u8fdb\u884c\u4e86\u5168\u9762\u7684\u8ba8\u8bba\u548c\u5206\u6790\u3002\u5e0c\u671b\u672c\u6587\u80fd\u591f\u5bf9\u8bfb\u8005\u5728\u4f7f\u7528Linux\u7cfb\u7edf\u65f6\u66f4\u597d\u5730\u7406\u89e3\u548c\u8fd0\u7528\u73af\u5883\u53d8\u91cf\u547d\u4ee4\u63d0\u4f9b\u5e2e\u52a9\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728Linux\u7cfb\u7edf\u4e2d\uff0c\u73af\u5883\u53d8\u91cf\u662f\u4e00\u79cd\u80fd\u591f\u5f71\u54cd\u7cfb\u7edf\u884c\u4e3a\u548c\u7a0b\u5e8f\u8fd0\u884c\u7684\u914d\u7f6e\u53c2\u6570\u3002Linux\u63d0\u4f9b\u4e86\u4e00\u7cfb\u5217\u547d\u4ee4\u6765\u7ba1\u7406\u548c\u64cd\u4f5c\u73af\u5883\u53d8\u91cf\uff0c\u5305\u62ec\u67e5\u770b\u5f53\u524d\u73af\u5883\u53d8\u91cf\u3001\u6dfb\u52a0\u65b0\u7684\u73af\u5883\u53d8\u91cf\u3001\u4fee\u6539\u5df2\u5b58\u5728\u7684\u73af\u5883\u53d8\u91cf\u7b49\u3002echo\u547d\u4ee4\u662f\u67e5\u770b\u5f53\u524d\u73af\u5883\u53d8\u91cf\u7684\u5e38\u7528\u5de5\u5177\u3002\u8981\u6dfb\u52a0\u4e00\u4e2a\u65b0\u7684\u73af\u5883\u53d8\u91cf\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528export\u547d\u4ee4\u3002\u5982\u679c\u6211\u4eec\u60f3\u4fee\u6539\u5df2\u5b58\u5728\u7684\u73af\u5883\u53d8\u91cf\uff0c\u53ef\u4ee5\u4f7f\u7528export\u547d\u4ee4\u91cd\u65b0\u8d4b\u503c\u3002<\/p>\n","protected":false},"author":1,"featured_media":15304,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[162,23,150],"class_list":["post-15303","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-knowledge","tag-lhjbl","tag-lxt","tag-hjbl"],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/15303","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/comments?post=15303"}],"version-history":[{"count":0,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/15303\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media\/15304"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=15303"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=15303"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=15303"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}