{"id":295470,"date":"2025-01-09T12:16:22","date_gmt":"2025-01-09T04:16:22","guid":{"rendered":"https:\/\/lrxjmw.cn\/mqdjzwjwzjhj.html"},"modified":"2025-01-09T12:16:22","modified_gmt":"2025-01-09T04:16:22","slug":"mqdjzwjwzjhj","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/mqdjzwjwzjhj.html","title":{"rendered":"Mac\u542f\u52a8\u52a0\u8f7d\u6587\u4ef6\u4f4d\u7f6e\u53ca\u73af\u5883\u53d8\u91cf\u8bbe\u7f6e\u6307\u5357\uff1aBourne Shell\u4e0eC Shell\u8be6\u89e3"},"content":{"rendered":"

Mac\u542f\u52a8\u52a0\u8f7d\u6587\u4ef6\u4f4d\u7f6e\uff08\u53ef\u8bbe\u7f6e\u73af\u5883\u53d8\u91cf\uff09<\/p>\n

-------------------------------------------------------<\/p>\n

\uff081\uff09\u9996\u5148\u8981\u6653\u5f97\u4f60\u4f7f\u7528\u7684MacOSX\u662f\u54ea\u4e9b\u6837\u7684Shell<\/a>\uff0c\u4f7f\u7528\u547d\u4ee4<\/a><\/p>\n

echo$SHELL<\/p>\n

\u5047\u82e5\u8f93\u51fa\u7684\u662f\uff1acsh\u6216\u5219\u662ftcshlinux \u4fee\u6539\u73af\u5883\u53d8\u91cf \u91cd\u542f\u751f\u6548<\/strong>\uff0c\u8fd9\u4e48\u4f60\u7528\u7684\u5c31\u662fCShell\u3002<\/p>\n

\u5047\u82e5\u8f93\u51fa\u7684\u662f\uff1abashlinux \u4fee\u6539\u73af\u5883\u53d8\u91cf \u91cd\u542f\u751f\u6548<\/strong>\uff0csh\uff0czsh\uff0c\u8fd9\u4e48\u4f60\u7684\u7528\u7684\u53ef\u80fd\u5c31\u662fBourneShell\u7684\u4e00\u4e2a\u53d8\u79cd\u3002<\/p>\n

MacOSX10.2\u4e4b\u524d\u9ed8\u8ba4\u7684\u662fCShell\u3002<\/p>\n

MacOSX10.3\u4ee5\u540e\u9ed8\u8ba4\u7684\u662fBourneShell\u3002<\/p>\n

linux\u73af\u5883\u53d8\u91cf\u91cd\u542f\u5931\u6548_linux\u73af\u5883\u53d8\u91cf\u751f\u6548_linux \u4fee\u6539\u73af\u5883\u53d8\u91cf \u91cd\u542f\u751f\u6548<\/p>\n

\uff082\uff09\u5047\u5982\u662fBourneShell\u3002<\/p>\n

\u8fd9\u4e48\u4f60\u53ef\u4ee5\u628a\u4f60\u8981\u6dfb\u52a0\u7684\u73af\u5883\u53d8\u91cf\u6dfb\u52a0\u5230\u4f60\u4e3b\u76ee\u5f55\u4e0b\u8fb9\u7684.profile\u6216\u5219.bash_profile\uff0c\u5047\u5982\u5b58\u5728\u6ca1\u6709\u5173\u7cfb\u6dfb\u52a0\u8fdb\u53bb\u5373\u53ef\uff0c\u5047\u5982\u6ca1\u6709\u751f\u6210\u4e00\u4e2a\u3002<\/p>\n

Mac\u914d\u7f6e\u73af\u5883\u53d8\u91cf\u7684\u5730\u65b9<\/p>\n

1.\/etc\/profile\uff08\u5efa\u8bae\u4e0d\u66f4\u6539\u8fd9\u4e2a\u6587\u4ef6\uff09<\/p>\n

\u5168\u5c40\uff08\u516c\u6709\uff09\u914d\u7f6e\uff0c\u4e0d\u7ba1\u662f\u90a3\u4e2a\u7528\u6237\uff0c\u767b\u9646\u65f6\u5c31\u4f1a\u8bfb\u53d6\u8be5\u6587\u4ef6\u3002<\/p>\n

2.\/etc\/bashrc\uff08\u901a\u5e38\u5728\u8fd9\u4e2a\u6587\u4ef6\u4e2d\u6dfb\u52a0\u7cfb\u7edf\u7ea7\u73af\u5883\u53d8\u91cf\uff09<\/p>\n

\u5168\u5c40\uff08\u516c\u6709\uff09\u914d\u7f6e\uff0cbashshell\u6267\u884c\u65f6\uff0c\u4e0d\u7ba1\u662f\u4f55\u79cd\u65b9\u6cd5linux\u67e5\u770b\u64cd\u4f5c\u7cfb\u7edf\uff0c\u5c31\u4f1a\u8bfb\u53d6\u6b64\u6587\u4ef6\u3002<\/p>\n

3.~\/.bash_profile\uff08\u901a\u5e38\u5728\u8fd9\u4e2a\u6587\u4ef6\u4e2d\u6dfb\u52a0\u7528\u6237\u7ea7\u73af\u5883\u53d8\u91cf\uff09<\/p>\n

linux\u73af\u5883\u53d8\u91cf\u751f\u6548_linux\u73af\u5883\u53d8\u91cf\u91cd\u542f\u5931\u6548_linux \u4fee\u6539\u73af\u5883\u53d8\u91cf \u91cd\u542f\u751f\u6548<\/p>\n

\u6bcf\u4f4d\u7528\u6237\u90fd\u53ef\u4f7f\u7528\u8be5\u6587\u4ef6\u8f93\u5165\u4e13\u7528\u4e8e\u81ea\u5df1\u4f7f\u7528\u7684shell\u4fe1\u606f,\u5f53\u7528\u6237\u767b\u5165\u65f6,\u8be5\u6587\u4ef6\u4ec5\u4ec5\u6267\u884c\u4e00\u6b21!<\/p>\n

MAC\u66f4\u6539host\u6587\u4ef6<\/p>\n

-------------------------------------------------------<\/p>\n

sudovi\/etc\/hosts<\/p>\n

linux\u4e0b\u67e5\u770b\u548c\u6dfb\u52a0PATH\u73af\u5883\u53d8\u91cf<\/p>\n

==============================================<\/p>\n

PATH\u7684\u683c\u5f0f\u4e3a\uff1a<\/p>\n

-------------------------------------------------------<\/p>\n

PATH=$PATH:<\/p>\n

:------:<\/p>\n

linux\u73af\u5883\u53d8\u91cf\u91cd\u542f\u5931\u6548_linux\u73af\u5883\u53d8\u91cf\u751f\u6548_linux \u4fee\u6539\u73af\u5883\u53d8\u91cf \u91cd\u542f\u751f\u6548<\/p>\n

linux\u73af\u5883\u914d\u7f6e\uff0c\u4e2d\u95f4\u7528\u9017\u53f7\u9694\u5f00\u3002<\/p>\n

\u6dfb\u52a0PATH\u73af\u5883\u53d8\u91cf\uff1a<\/p>\n

-------------------------------------------------------<\/p>\n

[root@localhostu-boot-sh4]#exportPATH=\/opt\/STM\/STLinux<\/a>-2.3\/devkit\/sh4\/bin:$PATH<\/p>\n

\u67e5\u770bPATH\u73af\u5883\u53d8\u91cf\uff1a<\/p>\n

-------------------------------------------------------<\/p>\n

[root@localhostu-boot-sh4]#echo$PATH<\/p>\n

linux \u4fee\u6539\u73af\u5883\u53d8\u91cf \u91cd\u542f\u751f\u6548_linux\u73af\u5883\u53d8\u91cf\u751f\u6548_linux\u73af\u5883\u53d8\u91cf\u91cd\u542f\u5931\u6548<\/p>\n

\/usr\/kerberos\/sbin:\/usr\/kerberos\/bin:\/usr\/local\/sbin:\/usr\/local\/bin:\/sbin:\/bin:\/usr\/sbin:\/usr\/bin:\/root\/bin<\/p>\n

\u64cd\u4f5c\u793a\u4f8b\uff1a<\/p>\n

-------------------------------------------------------<\/p>\n

\u901a\u8fc7\u7f16\u8f91\u542f\u52a8\u6587\u4ef6\u6765\u6539PATH\uff0c<\/p>\n

#vim\/etc\/profile<\/p>\n

\u5728\u6587\u6863\u6700\u540e\uff0c\u6dfb\u52a0:<\/p>\n

exportPATH=\"\/opt\/STM\/STLinux<\/a>-2.3\/devkit\/sh4\/bin:$PATH\"<\/p>\n

\u4fdd\u5b58\uff0c\u9000\u51fa\u3002<\/p>\n

\u60f3\u7acb\u523b\u751f\u6548\u8bf7\u8fd0\u884c\uff1a<\/p>\n

#source\/etc\/profile<\/p>\n

\u4e0d\u62a5\u9519\u5219\u6210\u529f\u3002<\/p>\n

\u5047\u5982\u60f3\u7acb\u5373\u751f\u6548\uff0c\u5219\u53ef\u6267\u884c\u4e0b\u8fb9\u7684\u53e5\u5b50\uff1a<\/p>\n

$source.bash_profile\uff08\u8fd9\u662f\u6587\u4ef6\u540d\uff09<\/p>\n

\u73af\u5883\u53d8\u91cf\u4fee\u6539\u540e\uff0c\u5728\u7528\u6237\u4e0a\u6b21\u767b\u5f55\u65f6\u751f\u6548\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

\u542f\u52a8\u52a0\u8f7d\u6587\u4ef6\u4f4d\u7f6e\uff08\u53ef\u8bbe\u7f6e\u73af\u5883\u53d8\u91cf\uff09\u90a3\u4e48\u4f60\u53ef\u4ee5\u628a\u4f60\u8981\u6dfb\u52a0\u7684\u73af\u5883\u53d8\u91cf\u6dfb\u52a0\u5230\u4f60\u4e3b\u76ee\u5f55\u4e0b\u9762\u7684.profile\u6216\u8005.bash_profile\uff0c\u5982\u679c\u5b58\u5728\u6ca1\u6709\u5173\u7cfb\u6dfb\u52a0\u8fdb\u53bb\u5373\u53ef\uff0c\u5982\u679c\u6ca1\u6709\u751f\u6210\u4e00\u4e2a\u3002\uff08\u4e00\u822c\u5728\u8fd9\u4e2a\u6587\u4ef6\u4e2d\u6dfb\u52a0\u7cfb\u7edf\u7ea7\u73af\u5883\u53d8\u91cf\uff09\uff08\u4e00\u822c\u5728\u8fd9\u4e2a\u6587\u4ef6\u4e2d\u6dfb\u52a0\u7528\u6237\u7ea7\u73af\u5883\u53d8\u91cf\uff09\u73af\u5883\u53d8\u91cf\u66f4\u6539\u540e\uff0c\u5728\u7528\u6237\u4e0b\u6b21\u767b\u9646\u65f6\u751f\u6548\u3002<\/p>\n","protected":false},"author":1,"featured_media":295471,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[988],"tags":[109,3114,212,3048,1006],"class_list":["post-295470","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tougao","tag-linux","tag-p-25","tag-shell","tag-wjcz-2","tag-hjbl"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/295470","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=295470"}],"version-history":[{"count":0,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/295470\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/295471"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=295470"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=295470"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=295470"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}