{"id":112,"date":"2025-07-01T20:20:50","date_gmt":"2025-07-01T12:20:50","guid":{"rendered":"https:\/\/www.rbfwq.com\/blog\/?p=112"},"modified":"2025-07-01T20:20:50","modified_gmt":"2025-07-01T12:20:50","slug":"terminal-%e9%80%89%e4%b8%ad%e5%a4%8d%e5%88%b6%e7%9a%84%e5%ae%8c%e6%95%b4%e6%93%8d%e4%bd%9c%e6%8c%87%e5%8d%97%e4%b8%8e%e5%ae%9e%e7%94%a8%e6%8a%80%e5%b7%a7","status":"publish","type":"post","link":"https:\/\/www.idc61.com\/blog\/112.html","title":{"rendered":"terminal \u9009\u4e2d\u590d\u5236\u7684\u5b8c\u6574\u64cd\u4f5c\u6307\u5357\u4e0e\u5b9e\u7528\u6280\u5de7"},"content":{"rendered":"<p><p>\u5728\u65e5\u5e38\u5f00\u53d1\u4e0e\u8fd0\u7ef4\u5de5\u4f5c\u4e2d\uff0c<strong>terminal<\/strong>\uff08\u7ec8\u7aef\uff09\u662f\u4e00\u4e2a\u5f3a\u6709\u529b\u7684\u5de5\u5177\uff0c\u5b83\u4e0d\u4ec5\u53ef\u4ee5\u6267\u884c\u5404\u79cd\u7cfb\u7edf\u547d\u4ee4\uff0c\u8fd8\u80fd\u591f\u901a\u8fc7\u547d\u4ee4\u884c\u8fdb\u884c\u590d\u5236\u548c\u7c98\u8d34\u64cd\u4f5c\u3002\u8fd9\u7bc7\u6587\u7ae0\u5c06\u6df1\u5165\u63a2\u8ba8\u5982\u4f55\u5728 terminal \u4e2d\u9009\u62e9\u5e76\u590d\u5236\u6587\u672c\uff0c\u540c\u65f6\u63d0\u4f9b\u5b9e\u7528\u7684\u6b65\u9aa4\u548c\u63d0\u793a\uff0c\u5e2e\u52a9\u4f60\u66f4\u6709\u6548\u5730\u4f7f\u7528\u7ec8\u7aef\u3002<\/p>\n<p style=\"text-align:center\"><img decoding=\"async\" src=\"https:\/\/www.idc61.com\/blog\/wp-content\/uploads\/2025\/06\/JE8DrKi9.jpg\" alt=\"terminal \u9009\u4e2d\u590d\u5236\u7684\u5b8c\u6574\u64cd\u4f5c\u6307\u5357\u4e0e\u5b9e\u7528\u6280\u5de7\" title=\"terminal \u9009\u4e2d\u590d\u5236\u7684\u5b8c\u6574\u64cd\u4f5c\u6307\u5357\u4e0e\u5b9e\u7528\u6280\u5de7\"><\/p>\n<\/p>\n<p><h2>\u4e00\u3001\u64cd\u4f5c\u524d\u7684\u51c6\u5907<\/h2>\n<\/p>\n<p><p>\u5728\u5f00\u59cb\u4e4b\u524d\uff0c\u786e\u4fdd\u4f60\u5df2\u7ecf\u6253\u5f00\u4e86\u4e00\u4e2a terminal \u7a97\u53e3\u3002\u65e0\u8bba\u4f60\u4f7f\u7528\u7684\u662f macOS\u3001Linux\uff0c\u8fd8\u662f Windows \u7684 WSL\uff08Windows Subsystem for Linux\uff09\uff0c\u53ea\u8981\u662f\u6807\u51c6\u7684 terminal \u7a97\u53e3\uff0c\u64cd\u4f5c\u65b9\u6cd5\u57fa\u672c\u4e00\u81f4\u3002\u6b64\u5916\uff0c\u786e\u8ba4\u4f60\u7684 terminal \u662f\u5426\u652f\u6301\u9f20\u6807\u64cd\u4f5c\u7684\u6587\u672c\u9009\u62e9\u4e0e\u590d\u5236\u529f\u80fd\uff0c\u8fd9\u901a\u5e38\u662f\u9ed8\u8ba4\u60c5\u51b5\u4e0b\u53ef\u7528\u7684\u3002<\/p>\n<\/p>\n<p><h2>\u4e8c\u3001\u5b8c\u6210\u4efb\u52a1\u7684\u8be6\u7ec6\u6b65\u9aa4<\/h2>\n<\/p>\n<p><h3>1. \u9009\u62e9\u6587\u672c<\/h3>\n<\/p>\n<p><p>\u5728 terminal \u4e2d\u9009\u62e9\u6587\u672c\u7684\u65b9\u6cd5\u56e0\u64cd\u4f5c\u7cfb\u7edf\u800c\u5f02\u3002\u4ee5\u4e0b\u662f\u4e09\u4e2a\u4e3b\u8981\u5e73\u53f0\u7684\u9009\u62e9\u65b9\u5f0f\uff1a<\/p>\n<\/p>\n<p><h4>Linux \u7cfb\u7edf<\/h4>\n<\/p>\n<ul>\n<li>\u4f7f\u7528\u9f20\u6807\uff1a\u76f4\u63a5\u7528\u9f20\u6807\u5de6\u952e\u70b9\u51fb\u5e76\u62d6\u52a8\uff0c\u9009\u4e2d\u60f3\u8981\u590d\u5236\u7684\u6587\u672c\u3002<\/li>\n<li>\u952e\u76d8\u9009\u62e9\uff1a\u6309\u4f4f <strong>Shift<\/strong> \u952e\uff0c\u4f7f\u7528\u65b9\u5411\u952e\u6765\u6269\u5c55\u9009\u62e9\u3002<\/li>\n<\/ul>\n<p><h4>macOS \u7cfb\u7edf<\/h4>\n<\/p>\n<ul>\n<li>\u4f7f\u7528\u9f20\u6807\uff1a\u7528\u9f20\u6807\u5de6\u952e\u70b9\u51fb\u5e76\u62d6\u52a8\u4ee5\u9009\u4e2d\u3002<\/li>\n<li>\u952e\u76d8\u9009\u62e9\uff1a\u6309\u4f4f <strong>Shift<\/strong> + <strong>\u65b9\u5411\u952e<\/strong> \u6765\u8fdb\u884c\u9009\u62e9\u3002<\/li>\n<\/ul>\n<p><h4>Windows \/ WSL \u7cfb\u7edf<\/h4>\n<\/p>\n<ul>\n<li>\u4f7f\u7528\u9f20\u6807\uff1a\u53f3\u952e\u70b9\u51fb\u5e76\u62d6\u52a8\u4ee5\u9009\u4e2d\u3002<\/li>\n<li>\u952e\u76d8\u9009\u62e9\uff1a\u6309\u4f4f <strong>Shift<\/strong> \u5e76\u7528\u65b9\u5411\u952e\u6765\u8fdb\u884c\u9009\u62e9\u3002<\/li>\n<\/ul>\n<p><h3>2. \u590d\u5236\u9009\u4e2d\u7684\u6587\u672c<\/h3>\n<\/p>\n<p><p>\u6587\u672c\u9009\u62e9\u5b8c\u6210\u540e\uff0c\u4e0b\u4e00\u6b65\u662f\u590d\u5236\u6240\u9009\u7684\u6587\u672c\u3002\u5177\u4f53\u64cd\u4f5c\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<p><h4>Linux \u7cfb\u7edf<\/h4>\n<\/p>\n<ul>\n<li>\u9f20\u6807\u53f3\u952e\u70b9\u51fb\u5e76\u9009\u62e9 <strong>Copy<\/strong>\uff0c\u6216\u8005\u4f7f\u7528\u5feb\u6377\u952e <strong>Ctrl<\/strong> + <strong>Shift<\/strong> + <strong>C<\/strong>\u3002<\/li>\n<\/ul>\n<p><h4>macOS \u7cfb\u7edf<\/h4>\n<\/p>\n<ul>\n<li>\u6309\u4e0b <strong>Command<\/strong> + <strong>C<\/strong> \u8fdb\u884c\u590d\u5236\u3002<\/li>\n<\/ul>\n<p><h4>Windows \/ WSL \u7cfb\u7edf<\/h4>\n<\/p>\n<ul>\n<li>\u53f3\u952e\u70b9\u51fb\u5e76\u9009\u62e9 <strong>Copy<\/strong>\uff0c\u6216\u8005\u4f7f\u7528\u5feb\u6377\u952e <strong>Ctrl<\/strong> + <strong>C<\/strong>\u3002<\/li>\n<\/ul>\n<p><h3>3. \u7c98\u8d34\u6587\u672c<\/h3>\n<\/p>\n<p><p>\u5b8c\u6210\u590d\u5236\u4e4b\u540e\uff0c\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u65b9\u6cd5\u7c98\u8d34\u6587\u672c\uff1a<\/p>\n<\/p>\n<p><h4>Linux \u7cfb\u7edf<\/h4>\n<\/p>\n<ul>\n<li>\u53f3\u952e\u70b9\u51fb\u5e76\u9009\u62e9 <strong>Paste<\/strong>\uff0c\u6216\u8005\u4f7f\u7528\u5feb\u6377\u952e <strong>Ctrl<\/strong> + <strong>Shift<\/strong> + <strong>V<\/strong>\u3002<\/li>\n<\/ul>\n<p><h4>macOS \u7cfb\u7edf<\/h4>\n<\/p>\n<ul>\n<li>\u6309\u4e0b <strong>Command<\/strong> + <strong>V<\/strong> \u8fdb\u884c\u7c98\u8d34\u3002<\/li>\n<\/ul>\n<p><h4>Windows \/ WSL \u7cfb\u7edf<\/h4>\n<\/p>\n<ul>\n<li>\u53f3\u952e\u70b9\u51fb\u5e76\u9009\u62e9 <strong>Paste<\/strong>\uff0c\u6216\u8005\u4f7f\u7528\u5feb\u6377\u952e <strong>Ctrl<\/strong> + <strong>V<\/strong>\u3002<\/li>\n<\/ul>\n<p><h2>\u4e09\u3001\u5173\u952e\u547d\u4ee4\u4e0e\u4ee3\u7801\u793a\u4f8b<\/h2>\n<\/p>\n<p><p>\u5728\u64cd\u4f5c terminal \u7684\u8fc7\u7a0b\u4e2d\uff0c\u6709\u4e00\u4e9b\u5173\u952e\u547d\u4ee4\u548c\u4ee3\u7801\u7247\u6bb5\u53ef\u80fd\u4f1a\u5bf9\u4f60\u6709\u6240\u5e2e\u52a9\uff1a<\/p>\n<\/p>\n<p><pre><code>ls      # \u5217\u51fa\u5f53\u524d\u76ee\u5f55\u4e0b\u7684\u6240\u6709\u6587\u4ef6\u548c\u6587\u4ef6\u5939<\/p>\r\n<p>cd      # \u66f4\u6539\u76ee\u5f55<\/p>\r\n<p>mkdir   # \u521b\u5efa\u65b0\u76ee\u5f55<\/p>\r\n<p>rm      # \u5220\u9664\u6587\u4ef6\u6216\u76ee\u5f55<\/p>\r\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e0a\u8ff0\u547d\u4ee4\u662f\u65e5\u5e38\u4f7f\u7528\u4e2d\u9891\u7e41\u51fa\u73b0\u7684\u57fa\u672c\u547d\u4ee4\uff0c\u719f\u6089\u8fd9\u4e9b\u547d\u4ee4\u5c06\u4f7f\u5f97\u4f60\u7684 terminal \u64cd\u4f5c\u66f4\u52a0\u987a\u5229\u3002<\/p>\n<\/p>\n<p><h2>\u56db\u3001\u91cd\u8981\u6982\u5ff5\u4e0e\u547d\u4ee4\u89e3\u91ca<\/h2>\n<\/p>\n<p><p>\u5728 terminal \u4e2d\u5de5\u4f5c\u65f6\uff0c\u7406\u89e3\u4e00\u4e9b\u57fa\u672c\u7684\u6982\u5ff5\u53ef\u4ee5\u5e2e\u52a9\u4f60\u66f4\u9ad8\u6548\u5730\u5b8c\u6210\u4efb\u52a1\uff1a<\/p>\n<\/p>\n<ul>\n<li><strong>\u76ee\u5f55\uff08Directory\uff09<\/strong>\uff1a\u6587\u4ef6\u5b58\u50a8\u7684\u4f4d\u7f6e\uff0c\u6bcf\u4e2a\u6587\u4ef6\u90fd\u6709\u5176\u6240\u5728\u7684\u76ee\u5f55\u3002<\/li>\n<li><strong>\u6587\u4ef6\uff08File\uff09<\/strong>\uff1a\u76ee\u5f55\u4e2d\u7684\u57fa\u672c\u5355\u4f4d\uff0c\u4ee3\u8868\u5b9e\u9645\u7684\u6570\u636e\u3002<\/li>\n<li><strong>\u547d\u4ee4\u884c\uff08Command Line\uff09<\/strong>\uff1a\u76f4\u63a5\u5728 terminal \u4e2d\u8f93\u5165\u7684\u547d\u4ee4\uff0c\u64cd\u4f5c\u7cfb\u7edf\u901a\u8fc7\u5b83\u4e0e\u7528\u6237\u8fdb\u884c\u4ea4\u4e92\u3002<\/li>\n<\/ul>\n<p><h2>\u4e94\u3001\u6ce8\u610f\u4e8b\u9879\u4e0e\u5b9e\u7528\u6280\u5de7<\/h2>\n<\/p>\n<p><p>\u5728\u4f7f\u7528 terminal \u8fdb\u884c\u6587\u672c\u590d\u5236\u65f6\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u4e00\u4e9b\u95ee\u9898\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u6ce8\u610f\u4e8b\u9879\u548c\u5b9e\u7528\u6280\u5de7\uff1a<\/p>\n<\/p>\n<ul>\n<li>\u786e\u4fdd terminal \u7a97\u53e3\u5904\u4e8e\u6d3b\u52a8\u72b6\u6001\uff0c\u5f88\u591a\u65f6\u5019\u5728\u53e6\u4e00\u4e2a\u5e94\u7528\u7a0b\u5e8f\u4e2d\u6309\u4e0b <strong>Ctrl<\/strong> + <strong>C<\/strong> \u53ef\u80fd\u65e0\u6548\u3002<\/li>\n<li>\u5982\u679c\u65e0\u6cd5\u4f7f\u7528\u9f20\u6807\u8fdb\u884c\u590d\u5236\uff0c\u786e\u4fdd\u4f60\u7684 terminal \u914d\u7f6e\u5141\u8bb8\u9f20\u6807\u64cd\u4f5c\u3002<\/li>\n<li>\u6709\u4e9b terminal \u8f6f\u4ef6\u63d0\u4f9b\u4e86\u201c\u590d\u5236\u6a21\u5f0f\u201d\uff08\u5982 <strong>tmux<\/strong> \u6216 <strong>screen<\/strong>\uff09\uff0c\u5728\u4f7f\u7528\u8fd9\u4e9b\u5de5\u5177\u65f6\u9700\u8981\u989d\u5916\u7684\u547d\u4ee4\u6765\u8fdb\u884c\u6587\u672c\u9009\u62e9\u4e0e\u590d\u5236\u3002<\/li>\n<li>\u5728\u4f7f\u7528\u7684\u8fc7\u7a0b\u4e2d\uff0c\u591a\u6b21\u590d\u5236\u548c\u7c98\u8d34\u65f6\uff0c\u6ce8\u610f\u4fdd\u6301\u526a\u8d34\u677f\u4e2d\u7684\u5185\u5bb9\u6e05\u6670\uff0c\u4ee5\u514d\u6df7\u6dc6\u3002<\/li>\n<\/ul>\n<p><p>\u901a\u8fc7\u4e0a\u8ff0\u6b65\u9aa4\u4e0e\u914d\u7f6e\uff0c\u4f60\u5e94\u8be5\u80fd\u591f\u5728\u5404\u7c7b terminal \u4e2d\u81ea\u5982\u5730\u9009\u62e9\u3001\u590d\u5236\u548c\u7c98\u8d34\u6587\u672c\u3002\u65e0\u8bba\u4f60\u662f\u5f00\u53d1\u8005\u8fd8\u662f\u7cfb\u7edf\u7ba1\u7406\u5458\uff0c\u8fd9\u4e9b\u6280\u5de7\u90fd\u80fd\u663e\u8457\u63d0\u5347\u4f60\u7684\u5de5\u4f5c\u6548\u7387\u3002<\/p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728\u65e5\u5e38\u5f00\u53d1\u4e0e\u8fd0\u7ef4\u5de5\u4f5c\u4e2d\uff0cterminal\uff08\u7ec8\u7aef\uff09\u662f\u4e00\u4e2a\u5f3a\u6709\u529b\u7684\u5de5\u5177\uff0c\u5b83\u4e0d\u4ec5\u53ef\u4ee5\u6267\u884c\u5404\u79cd\u7cfb\u7edf\u547d\u4ee4\uff0c\u8fd8\u80fd\u591f\u901a\u8fc7\u547d\u4ee4\u884c\u8fdb\u884c\u590d\u5236\u548c\u7c98\u8d34\u64cd\u4f5c\u3002\u8fd9\u7bc7\u6587\u7ae0\u5c06\u6df1\u5165\u63a2\u8ba8\u5982\u4f55\u5728 terminal \u4e2d\u9009\u62e9\u5e76\u590d\u5236\u6587\u672c\uff0c\u540c\u65f6\u63d0\u4f9b\u5b9e\u7528\u7684\u6b65\u9aa4\u548c\u63d0\u793a\uff0c\u5e2e\u52a9\u4f60\u66f4\u6709\u6548\u5730\u4f7f\u7528\u7ec8&#8230;<\/p>\n","protected":false},"author":1,"featured_media":113,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[217,218,219],"topic":[],"class_list":["post-112","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-jishu","tag-terminal","tag-218","tag-219"],"_links":{"self":[{"href":"https:\/\/www.idc61.com\/blog\/wp-json\/wp\/v2\/posts\/112","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.idc61.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.idc61.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.idc61.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.idc61.com\/blog\/wp-json\/wp\/v2\/comments?post=112"}],"version-history":[{"count":1,"href":"https:\/\/www.idc61.com\/blog\/wp-json\/wp\/v2\/posts\/112\/revisions"}],"predecessor-version":[{"id":115,"href":"https:\/\/www.idc61.com\/blog\/wp-json\/wp\/v2\/posts\/112\/revisions\/115"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.idc61.com\/blog\/wp-json\/wp\/v2\/media\/113"}],"wp:attachment":[{"href":"https:\/\/www.idc61.com\/blog\/wp-json\/wp\/v2\/media?parent=112"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.idc61.com\/blog\/wp-json\/wp\/v2\/categories?post=112"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.idc61.com\/blog\/wp-json\/wp\/v2\/tags?post=112"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.idc61.com\/blog\/wp-json\/wp\/v2\/topic?post=112"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}