{"id":268377,"date":"2023-03-27T20:04:29","date_gmt":"2023-03-27T12:04:29","guid":{"rendered":"https:\/\/lrxjmw.cn\/lxtzdphjbllj.html"},"modified":"2023-03-27T20:04:29","modified_gmt":"2023-03-27T12:04:29","slug":"lxtzdphjbllj","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/lxtzdphjbllj.html","title":{"rendered":"Linux\u7cfb\u7edf\u4e2d\u7684PATH\u73af\u5883\u53d8\u91cf\u8def\u5f84\u6dfb\u52a0\u8def\u5f84\u7684\u53d8\u91cf"},"content":{"rendered":"
Linux<\/a>PATH\u73af\u5883\u53d8\u91cf\u662f\u4e00\u4e2a\u50a8\u5b58\u64cd\u4f5c\u7cfb\u7edf<\/a>\u4e2d\u53ef\u6267\u884c\u6587\u4ef6\u8def\u5f84\u7684\u53d8\u91cf\u3002\u7b80\u5355\u6765\u8bf4\uff0cPATH\u73af\u5883\u53d8\u91cf\u544a\u8bc9\u7cfb\u7edf\u5728\u90a3\u91cc\u627e\u5230\u6267\u884c\u547d\u4ee4<\/a>\u7684\u53ef\u6267\u884c\u6587\u4ef6\u3002\u4e3a\u6b64\uff0c\u5047\u5982\u4f60\u4f7f\u7528\u547d\u4ee4\u884c\uff0cPATH\u73af\u5883\u53d8\u91cf\u5c31\u663e\u5f97\u5341\u5206\u91cd\u8981\uff0c\u7531\u4e8e\u5b83\u51b3\u5b9a\u4e86\u7cfb\u7edf\u662f\u5426\u8fd8\u80fd\u627e\u5230\u4f60\u60f3\u8981\u6267\u884c\u7684\u547d\u4ee4\u3002<\/p>\n \u5728Linux\u7cfb\u7edf\u4e2d\uff0cPATH\u73af\u5883\u53d8\u91cf\u662f\u7531\u591a\u4e2a\u8def\u5f84\u7ec4\u6210\u7684\uff0c\u8fd9\u79cd\u8def\u5f84\u7528\u9017\u53f7\uff08:\uff09\u5206\u9694\u3002\u5f53\u4f60\u8f93\u5165\u4e00\u4e2a\u547d\u4ee4\u65f6\uff0c\u7cfb\u7edf\u4f1a\u5728\u8fd9\u79cd\u8def\u5f84\u4e2d\u6328\u4e2a\u67e5\u627e\uff0c\u76f4\u81f3\u627e\u5230\u53ef\u6267\u884c\u6587\u4ef6\u4e3a\u6b62\u3002\u82e5\u679c\u6ca1\u6709\u627e\u5230\u5219\u4f1a\u63d0\u793a\u201c-bash:commandnotfound\u201d\u3002<\/p>\n \u4f60\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u67e5\u770b\u5f53\u524d\u73af\u5883\u53d8\u91cf\uff1a<\/p>\n \n \u9ed8\u8ba4\u60c5\u51b5\u4e0b\u7ea2\u5e3dlinux\uff0cPATH\u73af\u5883\u53d8\u91cf\u5305\u62ec\u4ee5\u4e0b\u51e0\u4e2a\u8def\u5f84\uff1a<\/p>\n \n \u8fd9\u79cd\u8def\u5f84\u5305\u542b\u4e86\u64cd\u4f5c\u7cfb\u7edf\u4e2d\u6700\u57fa\u672c\u7684\u547d\u4ee4\u548c\u4e8c\u8865\u7801\u6587\u4ef6\u3002<\/p>\n \u4e00\u822c\uff0c\u5f53\u4f60\u987b\u8981\u4f7f\u7528\u65b0\u7684\u547d\u4ee4\u6216\u7a0b\u5e8f\u65f6\uff0c\u987b\u8981\u5c06\u5176\u6dfb\u52a0\u5230PATH\u73af\u5883\u53d8\u91cf\u4e2d\uff0c\u8ba9\u7cfb\u7edf\u80fd\u627e\u5230\u5b83\u3002<\/p>\n \u4e3e\u4e2a\u4e8b\u4f8b\uff0c\u5047\u5982\u4f60\u4e0b\u8f7d\u4e86\u4e00\u4e2aPython\u7a0b\u5e8flinux\u7cfb\u7edf\u65e5\u5fd7\uff0c\u5e76\u60f3\u5728\u7ec8\u7aef\u4e2d\u6267\u884c\u8be5\u7a0b\u5e8f\uff0c\u5219\u987b\u8981\u5c06Python\u7a0b\u5e8f\u6240\u5728\u7684\u76ee\u5f55\u6dfb\u52a0\u5230PATH\u73af\u5883\u53d8\u91cf\u4e2d\u3002<\/p>\n \u5047\u5b9aPython\u7a0b\u5e8f\u6240\u5728\u7684\u76ee\u5f55\u4e3a\/home\/user\/python_programs\uff0c\u4f60\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u5c06\u5176\u6dfb\u52a0\u5230PATH\u73af\u5883\u53d8\u91cf\u4e2d\uff1a<\/p>\n \n \u8fd9\u6761\u547d\u4ee4\u5c06\u4f60\u7684PATH\u73af\u5883\u53d8\u91cf\u6269\u5145\u4e86\u4e00\u4e2a\u65b0\u7684\u8def\u5f84\uff0c\u5373\/home\/user\/python_programs\u3002\u8fd9\u6837linux\u7528\u6237\u73af\u5883\u53d8\u91cf<\/strong>\uff0c\u5f53\u4f60\u987b\u8981\u5728\u7ec8\u7aef\u4e2d\u6267\u884c\u8be5\u7a0b\u5e8f\u65f6\uff0c\u7cfb\u7edf\u80fd\u591f\u5728\u8be5\u76ee\u5f55\u4e2d\u627e\u5230\u5b83\u3002<\/p>\n \u5047\u5982\u4f60\u60f3\u8981\u6c38\u4e45\u6dfb\u52a0\u65b0\u7684\u8def\u5f84\u5230PATH\u73af\u5883\u53d8\u91cf\u4e2d\uff0c\u5219\u987b\u8981\u7f16\u8f91~\/.bashrc\u6587\u4ef6\uff0c\u6dfb\u52a0\u4ee5\u4e0b\u4ee3\u7801\uff1a<\/p>\n \n \u8fd9\u6837\u6bcf\u6b21\u542f\u52a8\u7ec8\u7aef\u5c31\u4f1a\u624b\u52a8\u5c06\u65b0\u8def\u5f84\u6dfb\u52a0\u5230PATH\u73af\u5883\u53d8\u91cf\u4e2d\u3002<\/p>\n \u5728Linux\u7cfb\u7edf\u4e2d\uff0cPATH\u73af\u5883\u53d8\u91cf\u7684\u4f5c\u7528\u5341\u5206\u91cd\u8981\u3002\u901a\u8fc7\u7406\u89e3\u548c\u66f4\u6539PATH\u73af\u5883\u53d8\u91cflinux\u7528\u6237\u73af\u5883\u53d8\u91cf<\/strong>\uff0c\u4f60\u53ef\u4ee5\u66f4\u597d\u5730\u7ba1\u7406\u4f60\u7684\u7cfb\u7edf\uff0c\u5e76\u6267\u884c\u66f4\u591a\u7684\u64cd\u4f5c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":" PATH\u73af\u5883\u53d8\u91cf\u662f\u4e00\u4e2a\u5b58\u50a8\u64cd\u4f5c\u7cfb\u7edf\u4e2d\u53ef\u6267\u884c\u6587\u4ef6\u8def\u5f84\u7684\u53d8\u91cf\u3002\u5728Linux\u7cfb\u7edf\u4e2d\uff0cPATH\u73af\u5883\u53d8\u91cf\u662f\u7531\u591a\u4e2a\u8def\u5f84\u7ec4\u6210\u7684\uff0c\u8fd9\u4e9b\u8def\u5f84\u7528\u5192\u53f7\uff08:\uff09\u5206\u9694\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u67e5\u770b\u5f53\u524d\u73af\u5883\u53d8\u91cf\uff1a\u901a\u5e38\uff0c\u5f53\u4f60\u9700\u8981\u4f7f\u7528\u65b0\u7684\u547d\u4ee4\u6216\u7a0b\u5e8f\u65f6\uff0c\u9700\u8981\u5c06\u5176\u6dfb\u52a0\u5230PATH\u73af\u5883\u53d8\u91cf\u4e2d\uff0c\u8ba9\u7cfb\u7edf\u80fd\u627e\u5230\u5b83\u3002\u901a\u8fc7\u7406\u89e3\u548c\u4fee\u6539PATH\u73af\u5883\u53d8\u91cf\uff0c\u4f60\u53ef\u4ee5\u66f4\u597d\u5730\u7ba1\u7406\u4f60\u7684\u7cfb\u7edf\uff0c\u5e76\u6267\u884c\u66f4\u591a\u7684\u64cd\u4f5c\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[988],"tags":[999],"class_list":["post-268377","post","type-post","status-publish","format-standard","hentry","category-tougao","tag-999"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/268377","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=268377"}],"version-history":[{"count":0,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/268377\/revisions"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=268377"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=268377"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=268377"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}echo $PATH\n<\/code><\/pre>\n<\/p>\n
\/usr\/local\/sbin:\/usr\/local\/bin:\/usr\/sbin:\/usr\/bin:\/sbin:\/bin:\/usr\/games:\/usr\/local\/games:\/snap\/bin\n<\/code><\/pre>\n<\/p>\n
export PATH=$PATH:\/home\/user\/python_programs\n<\/code><\/pre>\n<\/p>\n
export PATH=$PATH:\/home\/user\/python_programs\n<\/code><\/pre>\n<\/p>\n