{"id":62133,"date":"2025-04-29T09:02:25","date_gmt":"2025-04-29T01:02:25","guid":{"rendered":"https:\/\/fwq.ai\/blog\/62133\/"},"modified":"2025-04-29T09:02:25","modified_gmt":"2025-04-29T01:02:25","slug":"linux-%e7%8e%af%e5%a2%83%e5%8f%98%e9%87%8f%e9%85%8d%e7%bd%ae%e6%b1%87%e6%80%bb-2","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/62133\/","title":{"rendered":"Linux \u73af\u5883\u53d8\u91cf\u914d\u7f6e\u6c47\u603b"},"content":{"rendered":"<pre>export&nbsp;PATH<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<ul>\n<li>\n<pre>vim&nbsp;~\/.bashrc<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236  <\/li>\n<li>\n<pre>vim&nbsp;~\/.bash_profile<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236  <\/li>\n<li>\n<pre>vim&nbsp;\/etc\/bashrc<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236  <\/li>\n<li>\n<pre>vim&nbsp;\/etc\/profile<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236  <\/li>\n<li>\n<pre>vim&nbsp;\/etc\/environment<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236  <\/li>\n<li>\n<pre>export\u547d\u4ee4\u663e\u793a\u5f53\u524d\u7cfb\u7edf\u5b9a\u4e49\u7684\u6240\u6709\u73af\u5883\u53d8\u91cfecho&nbsp;$PATH\u547d\u4ee4\u8f93\u51fa\u5f53\u524d\u7684PATH\u73af\u5883\u53d8\u91cf&nbsp;\u7684\u503c\u8fd9\u4e24\u4e2a\u547d\u4ee4\u6267\u884c\u7684\u6548\u679c\u5982\u4e0buusama@ubuntu:~$&nbsp;exportdeclare&nbsp;-x&nbsp;HOME=\"\/home\/uusama\"declare&nbsp;-x&nbsp;LANG=\"en_US.UTF-8\"declare&nbsp;-x&nbsp;LANGUAGE=\"en_US:\"declare&nbsp;-x&nbsp;LESSCLOSE=\"\/usr\/bin\/lesspipe&nbsp;%s&nbsp;%s\"declare&nbsp;-x&nbsp;LESSOPEN=\"|&nbsp;\/usr\/bin\/lesspipe&nbsp;%s\"declare&nbsp;-x&nbsp;LOGNAME=\"uusama\"declare&nbsp;-x&nbsp;MAIL=\"\/var\/mail\/uusama\"declare&nbsp;-x&nbsp;PATH=\"\/home\/uusama\/bin:\/home\/uusama\/.local\/bin:\/usr\/local\/sbin:\/usr\/local\/bin:\/usr\/sbin:\/usr\/bin:\/sbin:\/bin\"declare&nbsp;-x&nbsp;SSH_TTY=\"\/dev\/pts\/0\"declare&nbsp;-x&nbsp;TERM=\"xterm\"declare&nbsp;-x&nbsp;USER=\"uusama\"uusama@ubuntu:~$&nbsp;echo&nbsp;$PATH\/home\/uusama\/bin:\/home\/uusama\/.local\/bin:\/usr\/local\/sbin:\/usr\/local\/bin:\/usr\/sbin:\/usr\/bin:\/sbin:\/bin\n\u5176\u4e2dPATH\u53d8\u91cf\u5b9a\u4e49\u4e86\u8fd0\u884c\u547d\u4ee4\u7684\u67e5\u627e\u8def\u5f84\uff0c\u4ee5\u5192\u53f7:\u5206\u5272\u4e0d\u540c\u7684\u8def\u5f84\uff0c\u4f7f\u7528export\u5b9a\u4e49\u7684\u65f6\u5019\u53ef\u52a0\u53cc\u5f15\u53f7\u4e5f\u53ef\u4e0d\u52a0\u3002\u63a8\u8350\u4e0b\u81ea\u5df1\u505a\u7684&nbsp;Spring&nbsp;Cloud&nbsp;\u7684\u5b9e\u6218\u9879\u76ee\uff1ahttps:\/\/github.com\/YunaiV\/onemall03\u3001Linux\u73af\u5883\u53d8\u91cf\u914d\u7f6e\u65b9\u6cd5\u4e00\uff1aexport&nbsp;PATH\u4f7f\u7528export\u547d\u4ee4\u76f4\u63a5\u4fee\u6539PATH\u7684\u503c\uff0c\u914d\u7f6eMySQL\u8fdb\u5165\u73af\u5883\u53d8\u91cf\u7684\u65b9\u6cd5:export&nbsp;PATH=\/home\/uusama\/mysql\/bin:$PATH#&nbsp;\u6216\u8005\u628aPATH\u653e\u5728\u524d\u9762export&nbsp;PATH=$PATH:\/home\/uusama\/mysql\/bin\n\u6ce8\u610f\u4e8b\u9879\uff1a\u751f\u6548\u65f6\u95f4\uff1a\u7acb\u5373\u751f\u6548\u751f\u6548\u671f\u9650\uff1a\u5f53\u524d\u7ec8\u7aef\u6709\u6548\uff0c\u7a97\u53e3\u5173\u95ed\u540e\u65e0\u6548\u751f\u6548\u8303\u56f4\uff1a\u4ec5\u5bf9\u5f53\u524d\u7528\u6237\u6709\u6548\u914d\u7f6e\u7684\u73af\u5883\u53d8\u91cf&nbsp;\u4e2d\u4e0d\u8981\u5fd8\u4e86\u52a0\u4e0a\u539f\u6765\u7684\u914d\u7f6e\uff0c\u5373$PATH\u90e8\u5206\uff0c\u907f\u514d\u8986\u76d6\u539f\u6765\u914d\u7f6e04\u3001Linux\u73af\u5883\u53d8\u91cf\u914d\u7f6e\u65b9\u6cd5\u4e8c\uff1avim&nbsp;~\/.bashrc\u901a\u8fc7\u4fee\u6539\u7528\u6237\u76ee\u5f55\u4e0b\u7684~\/.bashrc\u6587\u4ef6\u8fdb\u884c\u914d\u7f6e\uff1avim&nbsp;~\/.bashrc#&nbsp;\u5728\u6700\u540e\u4e00\u884c\u52a0\u4e0aexport&nbsp;PATH=$PATH:\/home\/uusama\/mysql\/bin\n\u6ce8\u610f\u4e8b\u9879\uff1a\u751f\u6548\u65f6\u95f4\uff1a\u4f7f\u7528\u76f8\u540c\u7684\u7528\u6237\u6253\u5f00\u65b0\u7684\u7ec8\u7aef\u65f6\u751f\u6548\uff0c\u6216\u8005\u624b\u52a8source&nbsp;~\/.bashrc\u751f\u6548\u751f\u6548\u671f\u9650\uff1a\u6c38\u4e45\u6709\u6548\u751f\u6548\u8303\u56f4\uff1a\u4ec5\u5bf9\u5f53\u524d\u7528\u6237\u6709\u6548\u5982\u679c\u6709\u540e\u7eed\u7684\u73af\u5883\u53d8\u91cf\u52a0\u8f7d\u6587\u4ef6\u8986\u76d6\u4e86PATH\u5b9a\u4e49\uff0c\u5219\u53ef\u80fd\u4e0d\u751f\u654805\u3001Linux\u73af\u5883\u53d8\u91cf\u914d\u7f6e\u65b9\u6cd5\u4e09\uff1avim&nbsp;~\/.bash_profile\u548c\u4fee\u6539~\/.bashrc\u6587\u4ef6\u7c7b\u4f3c\uff0c\u4e5f\u662f\u8981\u5728\u6587\u4ef6\u6700\u540e\u52a0\u4e0a\u65b0\u7684\u8def\u5f84\u5373\u53ef\uff1avim&nbsp;~\/.bash_profile#&nbsp;\u5728\u6700\u540e\u4e00\u884c\u52a0\u4e0aexport&nbsp;PATH=$PATH:\/home\/uusama\/mysql\/bin\n\u6ce8\u610f\u4e8b\u9879\uff1a\u751f\u6548\u65f6\u95f4\uff1a\u4f7f\u7528\u76f8\u540c\u7684\u7528\u6237\u6253\u5f00\u65b0\u7684\u7ec8\u7aef\u65f6\u751f\u6548\uff0c\u6216\u8005\u624b\u52a8source&nbsp;~\/.bash_profile\u751f\u6548\u751f\u6548\u671f\u9650\uff1a\u6c38\u4e45\u6709\u6548\u751f\u6548\u8303\u56f4\uff1a\u4ec5\u5bf9\u5f53\u524d\u7528\u6237\u6709\u6548\u5982\u679c\u6ca1\u6709~\/.bash_profile\u6587\u4ef6\uff0c\u5219\u53ef\u4ee5\u7f16\u8f91~\/.profile\u6587\u4ef6\u6216\u8005\u65b0\u5efa\u4e00\u4e2a06\u3001Linux\u73af\u5883\u53d8\u91cf\u914d\u7f6e\u65b9\u6cd5\u56db\uff1avim&nbsp;\/etc\/bashrc\u8be5\u65b9\u6cd5\u662f\u4fee\u6539\u7cfb\u7edf\u914d\u7f6e\uff0c\u9700\u8981\u7ba1\u7406\u5458\u6743\u9650\uff08\u5982root\uff09\u6216\u8005\u5bf9\u8be5\u6587\u4ef6\u7684\u5199\u5165\u6743\u9650\uff1a#&nbsp;\u5982\u679c\/etc\/bashrc\u6587\u4ef6\u4e0d\u53ef\u7f16\u8f91\uff0c\u9700\u8981\u4fee\u6539\u4e3a\u53ef\u7f16\u8f91chmod&nbsp;-v&nbsp;u+w&nbsp;\/etc\/bashrcvim&nbsp;\/etc\/bashrc#&nbsp;\u5728\u6700\u540e\u4e00\u884c\u52a0\u4e0aexport&nbsp;PATH=$PATH:\/home\/uusama\/mysql\/bin\n\u6ce8\u610f\u4e8b\u9879\uff1a\u751f\u6548\u65f6\u95f4\uff1a\u65b0\u5f00\u7ec8\u7aef\u751f\u6548\uff0c\u6216\u8005\u624b\u52a8source&nbsp;\/etc\/bashrc\u751f\u6548\u751f\u6548\u671f\u9650\uff1a\u6c38\u4e45\u6709\u6548\u751f\u6548\u8303\u56f4\uff1a\u5bf9\u6240\u6709\u7528\u6237\u6709\u654807\u3001Linux\u73af\u5883\u53d8\u91cf\u914d\u7f6e\u65b9\u6cd5\u4e94\uff1avim&nbsp;\/etc\/profile\u8be5\u65b9\u6cd5\u4fee\u6539\u7cfb\u7edf\u914d\u7f6e\uff0c\u9700\u8981\u7ba1\u7406\u5458\u6743\u9650\u6216\u8005\u5bf9\u8be5\u6587\u4ef6\u7684\u5199\u5165\u6743\u9650\uff0c\u548cvim&nbsp;\/etc\/bashrc\u7c7b\u4f3c\uff1a#&nbsp;\u5982\u679c\/etc\/profile\u6587\u4ef6\u4e0d\u53ef\u7f16\u8f91\uff0c\u9700\u8981\u4fee\u6539\u4e3a\u53ef\u7f16\u8f91chmod&nbsp;-v&nbsp;u+w&nbsp;\/etc\/profilevim&nbsp;\/etc\/profile#&nbsp;\u5728\u6700\u540e\u4e00\u884c\u52a0\u4e0aexport&nbsp;PATH=$PATH:\/home\/uusama\/mysql\/bin\n\u6ce8\u610f\u4e8b\u9879\uff1a\u751f\u6548\u65f6\u95f4\uff1a\u65b0\u5f00\u7ec8\u7aef\u751f\u6548\uff0c\u6216\u8005\u624b\u52a8source&nbsp;\/etc\/profile\u751f\u6548\u751f\u6548\u671f\u9650\uff1a\u6c38\u4e45\u6709\u6548\u751f\u6548\u8303\u56f4\uff1a\u5bf9\u6240\u6709\u7528\u6237\u6709\u6548\u53e6\u5916\u641c\u7d22\u516c\u4f17\u53f7Linux\u4e2d\u6587\u793e\u533a\u56de\u590d\u5173\u952e\u5b57\"\u79c1\u623f\u83dc\u201d\u83b7\u53d6\u4e00\u4efd\u60ca\u559c\u793c\u5305\u3002\n08\u3001Linux\u73af\u5883\u53d8\u91cf\u914d\u7f6e\u65b9\u6cd5\u516d\uff1avim&nbsp;\/etc\/environment\u8be5\u65b9\u6cd5\u662f\u4fee\u6539\u7cfb\u7edf\u73af\u5883\u914d\u7f6e\u6587\u4ef6\uff0c\u9700\u8981\u7ba1\u7406\u5458\u6743\u9650\u6216\u8005\u5bf9\u8be5\u6587\u4ef6\u7684\u5199\u5165\u6743\u9650\uff1a#&nbsp;\u5982\u679c\/etc\/bashrc\u6587\u4ef6\u4e0d\u53ef\u7f16\u8f91\uff0c\u9700\u8981\u4fee\u6539\u4e3a\u53ef\u7f16\u8f91chmod&nbsp;-v&nbsp;u+w&nbsp;\/etc\/environmentvim&nbsp;\/etc\/profile#&nbsp;\u5728\u6700\u540e\u4e00\u884c\u52a0\u4e0aexport&nbsp;PATH=$PATH:\/home\/uusama\/mysql\/bin\n\u6ce8\u610f\u4e8b\u9879\uff1a\u751f\u6548\u65f6\u95f4\uff1a\u65b0\u5f00\u7ec8\u7aef\u751f\u6548\uff0c\u6216\u8005\u624b\u52a8source&nbsp;\/etc\/environment\u751f\u6548\u751f\u6548\u671f\u9650\uff1a\u6c38\u4e45\u6709\u6548\u751f\u6548\u8303\u56f4\uff1a\u5bf9\u6240\u6709\u7528\u6237\u6709\u654809\u3001Linux\u73af\u5883\u53d8\u91cf\u52a0\u8f7d\u539f\u7406\u89e3\u6790\u4e0a\u9762\u5217\u51fa\u4e86\u73af\u5883\u53d8\u91cf\u7684\u5404\u79cd\u914d\u7f6e\u65b9\u6cd5\uff0c\u90a3\u4e48Linux\u662f\u5982\u4f55\u52a0\u8f7d\u8fd9\u4e9b\u914d\u7f6e\u7684\u5462\uff1f\u662f\u4ee5\u4ec0\u4e48\u6837\u7684\u987a\u5e8f\u52a0\u8f7d\u7684\u5462\uff1f\u7279\u5b9a\u7684\u52a0\u8f7d\u987a\u5e8f\u4f1a\u5bfc\u81f4\u76f8\u540c\u540d\u79f0\u7684\u73af\u5883\u53d8\u91cf&nbsp;\u5b9a\u4e49\u88ab\u8986\u76d6\u6216\u8005\u4e0d\u751f\u6548\u300210\u3001\u73af\u5883\u53d8\u91cf\u7684\u5206\u7c7b\u73af\u5883\u53d8\u91cf\u53ef\u4ee5\u7b80\u5355\u7684\u5206\u6210\u7528\u6237\u81ea\u5b9a\u4e49\u7684\u73af\u5883\u53d8\u91cf\u4ee5\u53ca\u7cfb\u7edf\u7ea7\u522b\u7684\u73af\u5883\u53d8\u91cf\u3002\u7528\u6237\u7ea7\u522b\u73af\u5883\u53d8\u91cf&nbsp;\u5b9a\u4e49\u6587\u4ef6\uff1a~\/.bashrc\u3001~\/.profile\uff08\u90e8\u5206\u7cfb\u7edf\u4e3a\uff1a~\/.bash_profile\uff09\u7cfb\u7edf\u7ea7\u522b\u73af\u5883\u53d8\u91cf&nbsp;\u5b9a\u4e49\u6587\u4ef6\uff1a\/etc\/bashrc\u3001\/etc\/profile(\u90e8\u5206\u7cfb\u7edf\u4e3a\uff1a\/etc\/bash_profile\uff09\u3001\/etc\/environment<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236  <\/li>\n<\/ul>\n<p style=\"padding-top: 8px;padding-bottom: 8px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light,\">\u53e6\u5916\u5728\u7528\u6237\u73af\u5883\u53d8\u91cf\u4e2d\uff0c\u7cfb\u7edf\u4f1a\u9996\u5148\u8bfb\u53d6~\/.bash_profile\uff08\u6216\u8005~\/.profile\uff09\u6587\u4ef6\uff0c\u5982\u679c\u6ca1\u6709\u8be5\u6587\u4ef6\u5219\u8bfb\u53d6~\/.bash_login\uff0c\u6839\u636e\u8fd9\u4e9b\u6587\u4ef6\u4e2d\u5185\u5bb9\u518d\u53bb\u8bfb\u53d6~\/.bashrc\u3002<\/p>\n<h2>11\u3001\u6d4b\u8bd5Linux\u73af\u5883\u53d8\u91cf\u52a0\u8f7d\u987a\u5e8f\u7684\u65b9\u6cd5<\/h2>\n<p style=\"padding-top: 8px;padding-bottom: 8px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light,\">\u4e3a\u4e86\u6d4b\u8bd5\u5404\u4e2a\u4e0d\u540c\u6587\u4ef6\u7684<strong>\u73af\u5883\u53d8\u91cf<\/strong>&nbsp;\u52a0\u8f7d\u987a\u5e8f\uff0c\u6211\u4eec\u5728\u6bcf\u4e2a<strong>\u73af\u5883\u53d8\u91cf<\/strong>&nbsp;\u5b9a\u4e49\u6587\u4ef6\u4e2d\u7684\u7b2c\u4e00\u884c\u90fd\u5b9a\u4e49\u76f8\u540c\u7684<strong>\u73af\u5883\u53d8\u91cf<\/strong>&nbsp;UU_ORDER\uff0c\u8be5\u53d8\u91cf\u7684\u503c\u4e3a\u672c\u8eab\u7684\u503c\u8fde\u63a5\u4e0a\u5f53\u524d\u6587\u4ef6\u540d\u79f0\u3002<\/p>\n<p style=\"padding-top: 8px;padding-bottom: 8px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light,\">\u9700\u8981\u4fee\u6539\u7684\u6587\u4ef6\u5982\u4e0b\uff1a<\/p>\n<ul>\n<li>\n<pre>\/etc\/environment<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236    \u767b\u5f55\u540e\u590d\u5236  <\/li>\n<li>\n<pre>\/etc\/profile<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236    \u767b\u5f55\u540e\u590d\u5236  <\/li>\n<li>\n<pre>\/etc\/profile.d\/test.sh\uff0c\u65b0\u5efa\u6587\u4ef6\uff0c\u6ca1\u6709\u6587\u4ef6\u5939\u53ef\u7565\u8fc7\/etc\/bashrc\uff0c\u6216\u8005\/etc\/bash.bashrc<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236  <\/li>\n<li>\n<pre>~\/.bash_profile\uff0c\u6216\u8005~\/.profile<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236  <\/li>\n<li>\n<pre>~\/.bashrc<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236    \u767b\u5f55\u540e\u590d\u5236  <\/li>\n<\/ul>\n<p style=\"padding-top: 8px;padding-bottom: 8px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light,\">\u5728\u6bcf\u4e2a\u6587\u4ef6\u4e2d\u7684\u7b2c\u4e00\u884c\u90fd\u52a0\u4e0a\u4e0b\u9762\u8fd9\u53e5\u4ee3\u7801\uff0c\u5e76\u76f8\u5e94\u7684\u628a\u5192\u53f7\u540e\u7684\u5185\u5bb9\u4fee\u6539\u4e3a\u5f53\u524d\u6587\u4ef6\u7684\u7edd\u5bf9\u6587\u4ef6\u540d\u3002<\/p>\n<pre>export&nbsp;UU_ORDER=\"$UU_ORDER:~\/.bash_profile\"<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p style=\"padding-top: 8px;padding-bottom: 8px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light,\">\u4fee\u6539\u5b8c\u4e4b\u540e\u4fdd\u5b58\uff0c\u65b0\u5f00\u4e00\u4e2a\u7a97\u53e3\uff0c\u7136\u540eecho $UU_ORDER\u89c2\u5bdf\u53d8\u91cf\u7684\u503c\uff1a<\/p>\n<pre>uusama@ubuntu:~$&nbsp;echo&nbsp;$UU_ORDER$UU_ORDER:\/etc\/environment:\/etc\/profile:\/etc\/bash.bashrc:\/etc\/profile.d\/test.sh:~\/.profile:~\/.bashrc<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p style=\"padding-top: 8px;padding-bottom: 8px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light,\">\u53ef\u4ee5\u63a8\u6d4b\u51faLinux\u52a0\u8f7d\u73af\u5883\u53d8\u91cf\u7684\u987a\u5e8f\u5982\u4e0b\uff1a<\/p>\n<ol>\n<li>\n<pre>\/etc\/environment<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236    \u767b\u5f55\u540e\u590d\u5236  <\/li>\n<li>\n<pre>\/etc\/profile<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236    \u767b\u5f55\u540e\u590d\u5236  <\/li>\n<li>\n<pre>\/etc\/bash.bashrc<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236  <\/li>\n<li>\n<pre>\/etc\/profile.d\/test.sh<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236  <\/li>\n<li>\n<pre>~\/.profile<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236  <\/li>\n<li>\n<pre>~\/.bashrc<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236    \u767b\u5f55\u540e\u590d\u5236  <\/li>\n<\/ol>\n<h2>12\u3001Linux\u73af\u5883\u53d8\u91cf\u6587\u4ef6\u52a0\u8f7d\u8be6\u89e3<\/h2>\n<p style=\"padding-top: 8px;padding-bottom: 8px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light,\">\u7531\u4e0a\u9762\u7684\u6d4b\u8bd5\u53ef\u5bb9\u6613\u5f97\u51faLinux\u52a0\u8f7d<strong>\u73af\u5883\u53d8\u91cf<\/strong>&nbsp;\u7684\u987a\u5e8f\u5982\u4e0b\uff0c\uff1a<\/p>\n<p style=\"padding-top: 8px;padding-bottom: 8px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light,\">\u7cfb\u7edf\u73af\u5883\u53d8\u91cf -&gt; \u7528\u6237\u81ea\u5b9a\u4e49\u73af\u5883\u53d8\u91cf\/etc\/environment&nbsp;-&gt;&nbsp;\/etc\/profile&nbsp;-&gt;&nbsp;~\/.profile<\/p>\n<p style=\"padding-top: 8px;padding-bottom: 8px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light,\">\u6253\u5f00\/etc\/profile\u6587\u4ef6\u4f60\u4f1a\u53d1\u73b0\uff0c\u8be5\u6587\u4ef6\u7684\u4ee3\u7801\u4e2d\u4f1a\u52a0\u8f7d\/etc\/bash.bashrc\u6587\u4ef6\uff0c\u7136\u540e\u68c0\u67e5\/etc\/profile.d\/\u76ee\u5f55\u4e0b\u7684.sh\u6587\u4ef6\u5e76\u52a0\u8f7d\u3002<\/p>\n<pre>#&nbsp;\/etc\/profile:&nbsp;system-wide&nbsp;.profile&nbsp;file&nbsp;for&nbsp;the&nbsp;Bourne&nbsp;shell&nbsp;(sh(1))#&nbsp;and&nbsp;Bourne&nbsp;compatible&nbsp;shells&nbsp;(bash(1),&nbsp;ksh(1),&nbsp;ash(1),&nbsp;...).if&nbsp;[&nbsp;\"$PS1\"&nbsp;];&nbsp;then&nbsp;&nbsp;if&nbsp;[&nbsp;\"$BASH\"&nbsp;]&nbsp;&amp;amp;&amp;amp;&nbsp;[&nbsp;\"$BASH\"&nbsp;!=&nbsp;\"\/bin\/sh\"&nbsp;];&nbsp;then&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;The&nbsp;file&nbsp;bash.bashrc&nbsp;already&nbsp;sets&nbsp;the&nbsp;default&nbsp;PS1.&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;PS1='h:w$&nbsp;'&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;[&nbsp;-f&nbsp;\/etc\/bash.bashrc&nbsp;];&nbsp;then&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.&nbsp;\/etc\/bash.bashrc&nbsp;&nbsp;&nbsp;&nbsp;fi&nbsp;&nbsp;else&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;[&nbsp;\"`id&nbsp;-u`\"&nbsp;-eq&nbsp;0&nbsp;];&nbsp;then&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PS1='#&nbsp;'&nbsp;&nbsp;&nbsp;&nbsp;else&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PS1='$&nbsp;'&nbsp;&nbsp;&nbsp;&nbsp;fi&nbsp;&nbsp;fifiif&nbsp;[&nbsp;-d&nbsp;\/etc\/profile.d&nbsp;];&nbsp;then&nbsp;&nbsp;for&nbsp;i&nbsp;in&nbsp;\/etc\/profile.d\/*.sh;&nbsp;do&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;[&nbsp;-r&nbsp;$i&nbsp;];&nbsp;then&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.&nbsp;$i&nbsp;&nbsp;&nbsp;&nbsp;fi&nbsp;&nbsp;done&nbsp;&nbsp;unset&nbsp;ifi<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p style=\"padding-top: 8px;padding-bottom: 8px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light,\">\u5176\u6b21\u518d\u6253\u5f00~\/.profile\u6587\u4ef6\uff0c\u4f1a\u53d1\u73b0\u8be5\u6587\u4ef6\u4e2d\u52a0\u8f7d\u4e86~\/.bashrc\u6587\u4ef6\u3002<\/p>\n<pre>#&nbsp;if&nbsp;running&nbsp;bashif&nbsp;[&nbsp;-n&nbsp;\"$BASH_VERSION\"&nbsp;];&nbsp;then&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;include&nbsp;.bashrc&nbsp;if&nbsp;it&nbsp;exists&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;[&nbsp;-f&nbsp;\"$HOME\/.bashrc\"&nbsp;];&nbsp;then&nbsp;.&nbsp;\"$HOME\/.bashrc\"&nbsp;&nbsp;&nbsp;&nbsp;fifi#&nbsp;set&nbsp;PATH&nbsp;so&nbsp;it&nbsp;includes&nbsp;user's&nbsp;private&nbsp;bin&nbsp;directoriesPATH=\"$HOME\/bin:$HOME\/.local\/bin:$PATH\"<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p style=\"padding-top: 8px;padding-bottom: 8px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light,\">\u4ece~\/.profile\u6587\u4ef6\u4e2d\u4ee3\u7801\u4e0d\u96be\u53d1\u73b0\uff0c\/.profile\u6587\u4ef6<strong>\u53ea\u5728\u7528\u6237\u767b\u5f55\u7684\u65f6\u5019\u8bfb\u53d6\u4e00\u6b21<\/strong>&nbsp;\uff0c\u800c\/.bashrc\u4f1a\u5728\u6bcf\u6b21\u8fd0\u884cShell\u811a\u672c\u7684\u65f6\u5019\u8bfb\u53d6\u4e00\u6b21\u3002<\/p>\n<h2>13\u3001\u4e00\u4e9b\u5c0f\u6280\u5de7<\/h2>\n<p style=\"padding-top: 8px;padding-bottom: 8px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light,\">\u53ef\u4ee5\u81ea\u5b9a\u4e49\u4e00\u4e2a<strong>\u73af\u5883\u53d8\u91cf<\/strong>&nbsp;\u6587\u4ef6\uff0c\u6bd4\u5982\u5728\u67d0\u4e2a\u9879\u76ee\u4e0b\u5b9a\u4e49uusama.profile\uff0c\u5728\u8fd9\u4e2a\u6587\u4ef6\u4e2d\u4f7f\u7528export\u5b9a\u4e49\u4e00\u7cfb\u5217\u53d8\u91cf\uff0c\u7136\u540e\u5728~\/.profile\u6587\u4ef6\u540e\u9762\u52a0\u4e0a\uff1asourc uusama.profile\uff0c\u8fd9\u6837\u4f60\u6bcf\u6b21\u767b\u9646\u90fd\u53ef\u4ee5\u5728Shell\u811a\u672c\u4e2d\u4f7f\u7528\u81ea\u5df1\u5b9a\u4e49\u7684\u4e00\u7cfb\u5217\u53d8\u91cf\u3002<\/p>\n<p style=\"padding-top: 8px;padding-bottom: 8px;font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light,\">\u4e5f\u53ef\u4ee5\u4f7f\u7528alias\u547d\u4ee4\u5b9a\u4e49\u4e00\u4e9b\u547d\u4ee4\u7684\u522b\u540d\uff0c\u6bd4\u5982alias rm=&#8221;rm -i&#8221;\uff08\u53cc\u5f15\u53f7\u5fc5\u987b\uff09\uff0c\u5e76\u628a\u8fd9\u4e2a\u4ee3\u7801\u52a0\u5165\u5230~\/.profile\u4e2d\uff0c\u8fd9\u6837\u4f60\u6bcf\u6b21\u4f7f\u7528rm\u547d\u4ee4\u7684\u65f6\u5019\uff0c\u90fd\u76f8\u5f53\u4e8e\u4f7f\u7528rm -i\u547d\u4ee4\uff0c\u975e\u5e38\u65b9\u4fbf\u3002<\/p>\n<pre>&lt;br&gt;<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236    <\/p>\n<pre>&nbsp;&nbsp;\u58f0\u660e\uff1a\u672c\u6587\u90e8\u5206\u7d20\u6750\u8f6c\u8f7d\u81ea\u4e92\u8054\u7f51\uff0c\u5982\u6709\u4fb5\u6743\u7acb\u5373\u5220\u9664&nbsp;\u3002<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p style=\"font-family: -apple-system-font, BlinkMacSystemFont,\">&lt;br&gt;<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662fLinux \u73af\u5883\u53d8\u91cf\u914d\u7f6e\u6c47\u603b\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8FDCServers\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>export&nbsp;PATH \u767b\u5f55\u540e\u590d\u5236 vim&nbsp;~\/.bashrc \u767b\u5f55\u540e\u590d\u5236 vim&nbsp;~\/.bash_profile \u767b\u5f55\u540e\u590d\u5236 vim&nbsp;\/etc\/bashrc \u767b\u5f55\u540e\u590d\u5236 vim&nbsp;\/etc\/profile \u767b\u5f55\u540e\u590d\u5236 vim&nbsp;\/etc\/environment \u767b\u5f55\u540e\u590d\u5236 export\u547d\u4ee4\u663e\u793a\u5f53\u524d\u7cfb\u7edf\u5b9a\u4e49\u7684\u6240\u6709\u73af\u5883\u53d8\u91cfecho&nbsp;$PATH\u547d\u4ee4\u8f93\u51fa\u5f53\u524d\u7684PATH\u73af\u5883\u53d8\u91cf&nbsp;\u7684\u503c\u8fd9\u4e24\u4e2a\u547d\u4ee4\u6267\u884c\u7684\u6548\u679c\u5982\u4e0buusama@ubuntu:~$&nbsp;exportdeclare&nbsp;-x&nbsp;HOME=&#8221;\/home\/uusama&#8221;declare&nbsp;-x&nbsp;LANG=&#8221;en_US.UTF-8&#8243;declare&nbsp;-x&nbsp;LANGUAGE=&#8221;en_US:&#8221;declare&nbsp;-x&nbsp;LESSCLOSE=&#8221;\/usr\/bin\/lesspipe&nbsp;%s&nbsp;%s&#8221;declare&nbsp;-x&nbsp;LESSOPEN=&#8221;|&nbsp;\/usr\/bin\/lesspipe&nbsp;%s&#8221;declare&nbsp;-x&nbsp;LOGNAME=&#8221;uusama&#8221;declare&nbsp;-x&nbsp;MAIL=&#8221;\/var\/mail\/uusama&#8221;declare&nbsp;-x&nbsp;PATH=&#8221;\/home\/uusama\/bin:\/home\/uusama\/.local\/bin:\/usr\/local\/sbin:\/usr\/local\/bin:\/usr\/sbin:\/usr\/bin:\/sbin:\/bin&#8221;declare&nbsp;-x&nbsp;SSH_TTY=&#8221;\/dev\/pts\/0&#8243;declare&nbsp;-x&nbsp;TERM=&#8221;xterm&#8221;declare&nbsp;-x&nbsp;USER=&#8221;uusama&#8221;uusama@ubuntu:~$&nbsp;echo&nbsp;$PATH\/home\/uusama\/bin:\/home\/uusama\/.local\/bin:\/usr\/local\/sbin:\/usr\/local\/bin:\/usr\/sbin:\/usr\/bin:\/sbin:\/bin \u5176\u4e2dPATH\u53d8\u91cf\u5b9a\u4e49\u4e86\u8fd0\u884c\u547d\u4ee4\u7684\u67e5\u627e\u8def\u5f84\uff0c\u4ee5\u5192\u53f7:\u5206\u5272\u4e0d\u540c\u7684\u8def\u5f84\uff0c\u4f7f\u7528export\u5b9a\u4e49\u7684\u65f6\u5019\u53ef\u52a0\u53cc\u5f15\u53f7\u4e5f\u53ef\u4e0d\u52a0\u3002\u63a8\u8350\u4e0b\u81ea\u5df1\u505a\u7684&nbsp;Spring&nbsp;Cloud&nbsp;\u7684\u5b9e\u6218\u9879\u76ee\uff1ahttps:\/\/github.com\/YunaiV\/onemall03\u3001Linux\u73af\u5883\u53d8\u91cf\u914d\u7f6e\u65b9\u6cd5\u4e00\uff1aexport&nbsp;PATH\u4f7f\u7528export\u547d\u4ee4\u76f4\u63a5\u4fee\u6539PATH\u7684\u503c\uff0c\u914d\u7f6eMySQL\u8fdb\u5165\u73af\u5883\u53d8\u91cf\u7684\u65b9\u6cd5:export&nbsp;PATH=\/home\/uusama\/mysql\/bin:$PATH#&nbsp;\u6216\u8005\u628aPATH\u653e\u5728\u524d\u9762export&nbsp;PATH=$PATH:\/home\/uusama\/mysql\/bin \u6ce8\u610f\u4e8b\u9879\uff1a\u751f\u6548\u65f6\u95f4\uff1a\u7acb\u5373\u751f\u6548\u751f\u6548\u671f\u9650\uff1a\u5f53\u524d\u7ec8\u7aef\u6709\u6548\uff0c\u7a97\u53e3\u5173\u95ed\u540e\u65e0\u6548\u751f\u6548\u8303\u56f4\uff1a\u4ec5\u5bf9\u5f53\u524d\u7528\u6237\u6709\u6548\u914d\u7f6e\u7684\u73af\u5883\u53d8\u91cf&nbsp;\u4e2d\u4e0d\u8981\u5fd8\u4e86\u52a0\u4e0a\u539f\u6765\u7684\u914d\u7f6e\uff0c\u5373$PATH\u90e8\u5206\uff0c\u907f\u514d\u8986\u76d6\u539f\u6765\u914d\u7f6e04\u3001Linux\u73af\u5883\u53d8\u91cf\u914d\u7f6e\u65b9\u6cd5\u4e8c\uff1avim&nbsp;~\/.bashrc\u901a\u8fc7\u4fee\u6539\u7528\u6237\u76ee\u5f55\u4e0b\u7684~\/.bashrc\u6587\u4ef6\u8fdb\u884c\u914d\u7f6e\uff1avim&nbsp;~\/.bashrc#&nbsp;\u5728\u6700\u540e\u4e00\u884c\u52a0\u4e0aexport&nbsp;PATH=$PATH:\/home\/uusama\/mysql\/bin \u6ce8\u610f\u4e8b\u9879\uff1a\u751f\u6548\u65f6\u95f4\uff1a\u4f7f\u7528\u76f8\u540c\u7684\u7528\u6237\u6253\u5f00\u65b0\u7684\u7ec8\u7aef\u65f6\u751f\u6548\uff0c\u6216\u8005\u624b\u52a8source&nbsp;~\/.bashrc\u751f\u6548\u751f\u6548\u671f\u9650\uff1a\u6c38\u4e45\u6709\u6548\u751f\u6548\u8303\u56f4\uff1a\u4ec5\u5bf9\u5f53\u524d\u7528\u6237\u6709\u6548\u5982\u679c\u6709\u540e\u7eed\u7684\u73af\u5883\u53d8\u91cf\u52a0\u8f7d\u6587\u4ef6\u8986\u76d6\u4e86PATH\u5b9a\u4e49\uff0c\u5219\u53ef\u80fd\u4e0d\u751f\u654805\u3001Linux\u73af\u5883\u53d8\u91cf\u914d\u7f6e\u65b9\u6cd5\u4e09\uff1avim&nbsp;~\/.bash_profile\u548c\u4fee\u6539~\/.bashrc\u6587\u4ef6\u7c7b\u4f3c\uff0c\u4e5f\u662f\u8981\u5728\u6587\u4ef6\u6700\u540e\u52a0\u4e0a\u65b0\u7684\u8def\u5f84\u5373\u53ef\uff1avim&nbsp;~\/.bash_profile#&nbsp;\u5728\u6700\u540e\u4e00\u884c\u52a0\u4e0aexport&nbsp;PATH=$PATH:\/home\/uusama\/mysql\/bin \u6ce8\u610f\u4e8b\u9879\uff1a\u751f\u6548\u65f6\u95f4\uff1a\u4f7f\u7528\u76f8\u540c\u7684\u7528\u6237\u6253\u5f00\u65b0\u7684\u7ec8\u7aef\u65f6\u751f\u6548\uff0c\u6216\u8005\u624b\u52a8source&nbsp;~\/.bash_profile\u751f\u6548\u751f\u6548\u671f\u9650\uff1a\u6c38\u4e45\u6709\u6548\u751f\u6548\u8303\u56f4\uff1a\u4ec5\u5bf9\u5f53\u524d\u7528\u6237\u6709\u6548\u5982\u679c\u6ca1\u6709~\/.bash_profile\u6587\u4ef6\uff0c\u5219\u53ef\u4ee5\u7f16\u8f91~\/.profile\u6587\u4ef6\u6216\u8005\u65b0\u5efa\u4e00\u4e2a06\u3001Linux\u73af\u5883\u53d8\u91cf\u914d\u7f6e\u65b9\u6cd5\u56db\uff1avim&nbsp;\/etc\/bashrc\u8be5\u65b9\u6cd5\u662f\u4fee\u6539\u7cfb\u7edf\u914d\u7f6e\uff0c\u9700\u8981\u7ba1\u7406\u5458\u6743\u9650\uff08\u5982root\uff09\u6216\u8005\u5bf9\u8be5\u6587\u4ef6\u7684\u5199\u5165\u6743\u9650\uff1a#&nbsp;\u5982\u679c\/etc\/bashrc\u6587\u4ef6\u4e0d\u53ef\u7f16\u8f91\uff0c\u9700\u8981\u4fee\u6539\u4e3a\u53ef\u7f16\u8f91chmod&nbsp;-v&nbsp;u+w&nbsp;\/etc\/bashrcvim&nbsp;\/etc\/bashrc#&nbsp;\u5728\u6700\u540e\u4e00\u884c\u52a0\u4e0aexport&nbsp;PATH=$PATH:\/home\/uusama\/mysql\/bin \u6ce8\u610f\u4e8b\u9879\uff1a\u751f\u6548\u65f6\u95f4\uff1a\u65b0\u5f00\u7ec8\u7aef\u751f\u6548\uff0c\u6216\u8005\u624b\u52a8source&nbsp;\/etc\/bashrc\u751f\u6548\u751f\u6548\u671f\u9650\uff1a\u6c38\u4e45\u6709\u6548\u751f\u6548\u8303\u56f4\uff1a\u5bf9\u6240\u6709\u7528\u6237\u6709\u654807\u3001Linux\u73af\u5883\u53d8\u91cf\u914d\u7f6e\u65b9\u6cd5\u4e94\uff1avim&nbsp;\/etc\/profile\u8be5\u65b9\u6cd5\u4fee\u6539\u7cfb\u7edf\u914d\u7f6e\uff0c\u9700\u8981\u7ba1\u7406\u5458\u6743\u9650\u6216\u8005\u5bf9\u8be5\u6587\u4ef6\u7684\u5199\u5165\u6743\u9650\uff0c\u548cvim&nbsp;\/etc\/bashrc\u7c7b\u4f3c\uff1a#&nbsp;\u5982\u679c\/etc\/profile\u6587\u4ef6\u4e0d\u53ef\u7f16\u8f91\uff0c\u9700\u8981\u4fee\u6539\u4e3a\u53ef\u7f16\u8f91chmod&nbsp;-v&nbsp;u+w&nbsp;\/etc\/profilevim&nbsp;\/etc\/profile#&nbsp;\u5728\u6700\u540e\u4e00\u884c\u52a0\u4e0aexport&nbsp;PATH=$PATH:\/home\/uusama\/mysql\/bin \u6ce8\u610f\u4e8b\u9879\uff1a\u751f\u6548\u65f6\u95f4\uff1a\u65b0\u5f00\u7ec8\u7aef\u751f\u6548\uff0c\u6216\u8005\u624b\u52a8source&nbsp;\/etc\/profile\u751f\u6548\u751f\u6548\u671f\u9650\uff1a\u6c38\u4e45\u6709\u6548\u751f\u6548\u8303\u56f4\uff1a\u5bf9\u6240\u6709\u7528\u6237\u6709\u6548\u53e6\u5916\u641c\u7d22\u516c\u4f17\u53f7Linux\u4e2d\u6587\u793e\u533a\u56de\u590d\u5173\u952e\u5b57&#8221;\u79c1\u623f\u83dc\u201d\u83b7\u53d6\u4e00\u4efd\u60ca\u559c\u793c\u5305\u3002 08\u3001Linux\u73af\u5883\u53d8\u91cf\u914d\u7f6e\u65b9\u6cd5\u516d\uff1avim&nbsp;\/etc\/environment\u8be5\u65b9\u6cd5\u662f\u4fee\u6539\u7cfb\u7edf\u73af\u5883\u914d\u7f6e\u6587\u4ef6\uff0c\u9700\u8981\u7ba1\u7406\u5458\u6743\u9650\u6216\u8005\u5bf9\u8be5\u6587\u4ef6\u7684\u5199\u5165\u6743\u9650\uff1a#&nbsp;\u5982\u679c\/etc\/bashrc\u6587\u4ef6\u4e0d\u53ef\u7f16\u8f91\uff0c\u9700\u8981\u4fee\u6539\u4e3a\u53ef\u7f16\u8f91chmod&nbsp;-v&nbsp;u+w&nbsp;\/etc\/environmentvim&nbsp;\/etc\/profile#&nbsp;\u5728\u6700\u540e\u4e00\u884c\u52a0\u4e0aexport&nbsp;PATH=$PATH:\/home\/uusama\/mysql\/bin \u6ce8\u610f\u4e8b\u9879\uff1a\u751f\u6548\u65f6\u95f4\uff1a\u65b0\u5f00\u7ec8\u7aef\u751f\u6548\uff0c\u6216\u8005\u624b\u52a8source&nbsp;\/etc\/environment\u751f\u6548\u751f\u6548\u671f\u9650\uff1a\u6c38\u4e45\u6709\u6548\u751f\u6548\u8303\u56f4\uff1a\u5bf9\u6240\u6709\u7528\u6237\u6709\u654809\u3001Linux\u73af\u5883\u53d8\u91cf\u52a0\u8f7d\u539f\u7406\u89e3\u6790\u4e0a\u9762\u5217\u51fa\u4e86\u73af\u5883\u53d8\u91cf\u7684\u5404\u79cd\u914d\u7f6e\u65b9\u6cd5\uff0c\u90a3\u4e48Linux\u662f\u5982\u4f55\u52a0\u8f7d\u8fd9\u4e9b\u914d\u7f6e\u7684\u5462\uff1f\u662f\u4ee5\u4ec0\u4e48\u6837\u7684\u987a\u5e8f\u52a0\u8f7d\u7684\u5462\uff1f\u7279\u5b9a\u7684\u52a0\u8f7d\u987a\u5e8f\u4f1a\u5bfc\u81f4\u76f8\u540c\u540d\u79f0\u7684\u73af\u5883\u53d8\u91cf&nbsp;\u5b9a\u4e49\u88ab\u8986\u76d6\u6216\u8005\u4e0d\u751f\u6548\u300210\u3001\u73af\u5883\u53d8\u91cf\u7684\u5206\u7c7b\u73af\u5883\u53d8\u91cf\u53ef\u4ee5\u7b80\u5355\u7684\u5206\u6210\u7528\u6237\u81ea\u5b9a\u4e49\u7684\u73af\u5883\u53d8\u91cf\u4ee5\u53ca\u7cfb\u7edf\u7ea7\u522b\u7684\u73af\u5883\u53d8\u91cf\u3002\u7528\u6237\u7ea7\u522b\u73af\u5883\u53d8\u91cf&nbsp;\u5b9a\u4e49\u6587\u4ef6\uff1a~\/.bashrc\u3001~\/.profile\uff08\u90e8\u5206\u7cfb\u7edf\u4e3a\uff1a~\/.bash_profile\uff09\u7cfb\u7edf\u7ea7\u522b\u73af\u5883\u53d8\u91cf&nbsp;\u5b9a\u4e49\u6587\u4ef6\uff1a\/etc\/bashrc\u3001\/etc\/profile(\u90e8\u5206\u7cfb\u7edf\u4e3a\uff1a\/etc\/bash_profile\uff09\u3001\/etc\/environment \u767b\u5f55\u540e\u590d\u5236 \u53e6\u5916\u5728\u7528\u6237\u73af\u5883\u53d8\u91cf\u4e2d\uff0c\u7cfb\u7edf\u4f1a\u9996\u5148\u8bfb\u53d6~\/.bash_profile\uff08\u6216\u8005~\/.profile\uff09\u6587\u4ef6\uff0c\u5982\u679c\u6ca1\u6709\u8be5\u6587\u4ef6\u5219\u8bfb\u53d6~\/.bash_login\uff0c\u6839\u636e\u8fd9\u4e9b\u6587\u4ef6\u4e2d\u5185\u5bb9\u518d\u53bb\u8bfb\u53d6~\/.bashrc\u3002 11\u3001\u6d4b\u8bd5Linux\u73af\u5883\u53d8\u91cf\u52a0\u8f7d\u987a\u5e8f\u7684\u65b9\u6cd5 \u4e3a\u4e86\u6d4b\u8bd5\u5404\u4e2a\u4e0d\u540c\u6587\u4ef6\u7684\u73af\u5883\u53d8\u91cf&nbsp;\u52a0\u8f7d\u987a\u5e8f\uff0c\u6211\u4eec\u5728\u6bcf\u4e2a\u73af\u5883\u53d8\u91cf&nbsp;\u5b9a\u4e49\u6587\u4ef6\u4e2d\u7684\u7b2c\u4e00\u884c\u90fd\u5b9a\u4e49\u76f8\u540c\u7684\u73af\u5883\u53d8\u91cf&nbsp;UU_ORDER\uff0c\u8be5\u53d8\u91cf\u7684\u503c\u4e3a\u672c\u8eab\u7684\u503c\u8fde\u63a5\u4e0a\u5f53\u524d\u6587\u4ef6\u540d\u79f0\u3002 \u9700\u8981\u4fee\u6539\u7684\u6587\u4ef6\u5982\u4e0b\uff1a \/etc\/environment \u767b\u5f55\u540e\u590d\u5236 \u767b\u5f55\u540e\u590d\u5236 \/etc\/profile \u767b\u5f55\u540e\u590d\u5236 \u767b\u5f55\u540e\u590d\u5236 \/etc\/profile.d\/test.sh\uff0c\u65b0\u5efa\u6587\u4ef6\uff0c\u6ca1\u6709\u6587\u4ef6\u5939\u53ef\u7565\u8fc7\/etc\/bashrc\uff0c\u6216\u8005\/etc\/bash.bashrc \u767b\u5f55\u540e\u590d\u5236 ~\/.bash_profile\uff0c\u6216\u8005~\/.profile \u767b\u5f55\u540e\u590d\u5236 ~\/.bashrc \u767b\u5f55\u540e\u590d\u5236 \u767b\u5f55\u540e\u590d\u5236 \u5728\u6bcf\u4e2a\u6587\u4ef6\u4e2d\u7684\u7b2c\u4e00\u884c\u90fd\u52a0\u4e0a\u4e0b\u9762\u8fd9\u53e5\u4ee3\u7801\uff0c\u5e76\u76f8\u5e94\u7684\u628a\u5192\u53f7\u540e\u7684\u5185\u5bb9\u4fee\u6539\u4e3a\u5f53\u524d\u6587\u4ef6\u7684\u7edd\u5bf9\u6587\u4ef6\u540d\u3002 export&nbsp;UU_ORDER=&#8221;$UU_ORDER:~\/.bash_profile&#8221; \u767b\u5f55\u540e\u590d\u5236 \u4fee\u6539\u5b8c\u4e4b\u540e\u4fdd\u5b58\uff0c\u65b0\u5f00\u4e00\u4e2a\u7a97\u53e3\uff0c\u7136\u540eecho $UU_ORDER\u89c2\u5bdf\u53d8\u91cf\u7684\u503c\uff1a uusama@ubuntu:~$&nbsp;echo&nbsp;$UU_ORDER$UU_ORDER:\/etc\/environment:\/etc\/profile:\/etc\/bash.bashrc:\/etc\/profile.d\/test.sh:~\/.profile:~\/.bashrc \u767b\u5f55\u540e\u590d\u5236 \u53ef\u4ee5\u63a8\u6d4b\u51faLinux\u52a0\u8f7d\u73af\u5883\u53d8\u91cf\u7684\u987a\u5e8f\u5982\u4e0b\uff1a \/etc\/environment \u767b\u5f55\u540e\u590d\u5236 \u767b\u5f55\u540e\u590d\u5236 \/etc\/profile \u767b\u5f55\u540e\u590d\u5236 \u767b\u5f55\u540e\u590d\u5236 \/etc\/bash.bashrc \u767b\u5f55\u540e\u590d\u5236 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-62133","post","type-post","status-publish","format-standard","hentry","category-os"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/62133","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=62133"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/62133\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=62133"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=62133"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=62133"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}