{"id":304,"date":"2026-02-28T12:14:58","date_gmt":"2026-02-28T04:14:58","guid":{"rendered":"https:\/\/docs.liuyaorobot.com\/?post_type=docs&#038;p=304"},"modified":"2026-02-28T12:16:30","modified_gmt":"2026-02-28T04:16:30","slug":"linux%e4%b8%ad%e7%9a%84tmux%e4%bd%bf%e7%94%a8%e6%95%99%e7%a8%8b","status":"publish","type":"docs","link":"https:\/\/docs.liuyaorobot.com\/?docs=%e8%bd%af%e7%a1%ac%e4%bb%b6%e8%bd%af%e7%a1%ac%e4%bb%b6%e7%8e%af%e5%a2%83%e5%8f%8a%e8%bf%9c%e7%a8%8b%e6%96%b9%e6%a1%88%e8%bd%af%e7%a1%ac%e4%bb%b6\/%e6%97%a0%e4%ba%ba%e6%9c%ba%e9%a3%9e%e8%a1%8c%e6%97%b6%e8%bf%9c%e7%a8%8b%e5%91%bd%e4%bb%a4%e5%90%af%e5%8a%a8%e6%ad%a3%e7%a1%ae%e6%96%b9%e6%b3%95%e3%80%8c%e9%87%8d%e8%a6%81%e3%80%8d\/linux%e4%b8%ad%e7%9a%84tmux%e4%bd%bf%e7%94%a8%e6%95%99%e7%a8%8b","title":{"rendered":"Linux\u4e2d\u7684Tmux\u4f7f\u7528\u6559\u7a0b"},"content":{"rendered":"\n<h1 class=\"wp-block-heading\" id=\"scroller-1\">\u4e00\u3001Tmux \u662f\u4ec0\u4e48\uff1f<\/h1>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"scroller-2\">1.1 \u4f1a\u8bdd\u4e0e\u8fdb\u7a0b<\/h2>\n\n\n\n<p>\u547d\u4ee4\u884c\u7684\u5178\u578b\u4f7f\u7528\u65b9\u5f0f\u662f\uff0c\u6253\u5f00\u4e00\u4e2a\u7ec8\u7aef\u7a97\u53e3\uff08terminal window\uff0c\u4ee5\u4e0b\u7b80\u79f0&#8221;\u7a97\u53e3&#8221;\uff09\uff0c\u5728\u91cc\u9762\u8f93\u5165\u547d\u4ee4\u3002<strong>\u7528\u6237\u4e0e\u8ba1\u7b97\u673a\u7684\u8fd9\u79cd\u4e34\u65f6\u7684\u4ea4\u4e92\uff0c\u79f0\u4e3a\u4e00\u6b21&#8221;\u4f1a\u8bdd&#8221;\uff08session\uff09<\/strong>&nbsp;\u3002<\/p>\n\n\n\n<p>\u4f1a\u8bdd\u7684\u4e00\u4e2a\u91cd\u8981\u7279\u70b9\u662f\uff0c\u7a97\u53e3\u4e0e\u5176\u4e2d\u542f\u52a8\u7684\u8fdb\u7a0b\u662f\u8fde\u5728\u4e00\u8d77\u7684\u3002\u6253\u5f00\u7a97\u53e3\uff0c\u4f1a\u8bdd\u5f00\u59cb\uff1b\u5173\u95ed\u7a97\u53e3\uff0c\u4f1a\u8bdd\u7ed3\u675f\uff0c\u4f1a\u8bdd\u5185\u90e8\u7684\u8fdb\u7a0b\u4e5f\u4f1a\u968f\u4e4b\u7ec8\u6b62\uff0c\u4e0d\u7ba1\u6709\u6ca1\u6709\u8fd0\u884c\u5b8c\u3002<\/p>\n\n\n\n<p>\u4e00\u4e2a\u5178\u578b\u7684\u4f8b\u5b50\u5c31\u662f\uff0cSSH \u767b\u5f55\u8fdc\u7a0b\u8ba1\u7b97\u673a\uff0c\u6253\u5f00\u4e00\u4e2a\u8fdc\u7a0b\u7a97\u53e3\u6267\u884c\u547d\u4ee4\u3002\u8fd9\u65f6\uff0c\u7f51\u7edc\u7a81\u7136\u65ad\u7ebf\uff0c\u518d\u6b21\u767b\u5f55\u7684\u65f6\u5019\uff0c\u662f\u627e\u4e0d\u56de\u4e0a\u4e00\u6b21\u6267\u884c\u7684\u547d\u4ee4\u7684\u3002\u56e0\u4e3a\u4e0a\u4e00\u6b21 SSH \u4f1a\u8bdd\u5df2\u7ecf\u7ec8\u6b62\u4e86\uff0c\u91cc\u9762\u7684\u8fdb\u7a0b\u4e5f\u968f\u4e4b\u6d88\u5931\u4e86\u3002<\/p>\n\n\n\n<p>\u4e3a\u4e86\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\uff0c\u4f1a\u8bdd\u4e0e\u7a97\u53e3\u53ef\u4ee5&#8221;\u89e3\u7ed1&#8221;\uff1a\u7a97\u53e3\u5173\u95ed\u65f6\uff0c\u4f1a\u8bdd\u5e76\u4e0d\u7ec8\u6b62\uff0c\u800c\u662f\u7ee7\u7eed\u8fd0\u884c\uff0c\u7b49\u5230\u4ee5\u540e\u9700\u8981\u7684\u65f6\u5019\uff0c\u518d\u8ba9\u4f1a\u8bdd&#8221;\u7ed1\u5b9a&#8221;\u5176\u4ed6\u7a97\u53e3\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"scroller-3\">1.2 Tmux \u7684\u4f5c\u7528<\/h2>\n\n\n\n<p><strong>Tmux \u5c31\u662f\u4f1a\u8bdd\u4e0e\u7a97\u53e3\u7684&#8221;\u89e3\u7ed1&#8221;\u5de5\u5177\uff0c\u5c06\u5b83\u4eec\u5f7b\u5e95\u5206\u79bb\u3002<\/strong><\/p>\n\n\n\n<p>\uff081\uff09\u5b83\u5141\u8bb8\u5728\u5355\u4e2a\u7a97\u53e3\u4e2d\uff0c\u540c\u65f6\u8bbf\u95ee\u591a\u4e2a\u4f1a\u8bdd\u3002\u8fd9\u5bf9\u4e8e\u540c\u65f6\u8fd0\u884c\u591a\u4e2a\u547d\u4ee4\u884c\u7a0b\u5e8f\u5f88\u6709\u7528\u3002<\/p>\n\n\n\n<p>\uff082\uff09 \u5b83\u53ef\u4ee5\u8ba9\u65b0\u7a97\u53e3&#8221;\u63a5\u5165&#8221;\u5df2\u7ecf\u5b58\u5728\u7684\u4f1a\u8bdd\u3002<\/p>\n\n\n\n<p>\uff083\uff09\u5b83\u5141\u8bb8\u6bcf\u4e2a\u4f1a\u8bdd\u6709\u591a\u4e2a\u8fde\u63a5\u7a97\u53e3\uff0c\u56e0\u6b64\u53ef\u4ee5\u591a\u4eba\u5b9e\u65f6\u5171\u4eab\u4f1a\u8bdd\u3002<\/p>\n\n\n\n<p>\uff084\uff09\u5b83\u8fd8\u652f\u6301\u7a97\u53e3\u4efb\u610f\u7684\u5782\u76f4\u548c\u6c34\u5e73\u62c6\u5206\u3002<\/p>\n\n\n\n<p>\u7c7b\u4f3c\u7684\u7ec8\u7aef\u590d\u7528\u5668\u8fd8\u6709 GNU Screen\u3002Tmux \u4e0e\u5b83\u529f\u80fd\u76f8\u4f3c\uff0c\u4f46\u662f\u66f4\u6613\u7528\uff0c\u4e5f\u66f4\u5f3a\u5927\u3002<\/p>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"scroller-4\">\u4e8c\u3001\u57fa\u672c\u7528\u6cd5<\/h1>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"scroller-5\">2.1 \u5b89\u88c5<\/h2>\n\n\n\n<p>Tmux \u4e00\u822c\u9700\u8981\u81ea\u5df1\u5b89\u88c5\u3002<\/p>\n\n\n\n<pre id=\"copy_target_0\" class=\"wp-block-code\"><code><em># Ubuntu \u6216 Debian<\/em> #\u5982\u679c\u662f\u4f7f\u7528magpie\u7cfb\u5217\u65e0\u4eba\u673a\u8bf7\u4f7f\u7528\u8fd9\u4e00\u4e2a\u6307\u4ee4\n$ sudo apt-get install tmux\n\n<em># CentOS \u6216 Fedora<\/em>\n$ sudo yum install tmux\n\n<em># Mac<\/em>\n$ brew install tmux\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"scroller-6\">2.2 \u542f\u52a8\u4e0e\u9000\u51fa<\/h2>\n\n\n\n<p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u952e\u5165&nbsp;<code>tmux<\/code>&nbsp;\u547d\u4ee4\uff0c\u5c31\u8fdb\u5165\u4e86 Tmux \u7a97\u53e3\u3002<\/p>\n\n\n\n<pre id=\"copy_target_1\" class=\"wp-block-code\"><code>$ tmux\n<\/code><\/pre>\n\n\n\n<p>\u4e0a\u9762\u547d\u4ee4\u4f1a\u542f\u52a8 Tmux \u7a97\u53e3\uff0c\u5e95\u90e8\u6709\u4e00\u4e2a\u72b6\u6001\u680f\u3002\u72b6\u6001\u680f\u7684\u5de6\u4fa7\u662f\u7a97\u53e3\u4fe1\u606f\uff08\u7f16\u53f7\u548c\u540d\u79f0\uff09\uff0c\u53f3\u4fa7\u662f\u7cfb\u7edf\u4fe1\u606f\u3002<br><img decoding=\"async\" src=\"https:\/\/img2022.cnblogs.com\/blog\/1303876\/202203\/1303876-20220309102125091-894090362.png\" alt=\"\"><br>\u6309\u4e0b&nbsp;<code>Ctrl+d<\/code>&nbsp;\u6216\u8005\u663e\u5f0f\u8f93\u5165&nbsp;<code>exit<\/code>\u547d\u4ee4\uff0c\u5c31\u53ef\u4ee5\u9000\u51fa Tmux \u7a97\u53e3\u3002<\/p>\n\n\n\n<pre id=\"copy_target_2\" class=\"wp-block-code\"><code>$ exit\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"scroller-7\">2.3 \u524d\u7f00\u952e<\/h2>\n\n\n\n<p>Tmux \u7a97\u53e3\u6709\u5927\u91cf\u7684\u5feb\u6377\u952e\u3002\u6240\u6709\u5feb\u6377\u952e\u90fd\u8981\u901a\u8fc7\u524d\u7f00\u952e\u5524\u8d77\u3002\u9ed8\u8ba4\u7684\u524d\u7f00\u952e\u662f&nbsp;<code>Ctrl+b<\/code>\uff0c\u5373\u5148\u6309\u4e0b&nbsp;<code>Ctrl+b<\/code>\uff0c\u5feb\u6377\u952e\u624d\u4f1a\u751f\u6548\u3002<\/p>\n\n\n\n<p>\u4e3e\u4f8b\u6765\u8bf4\uff0c\u5e2e\u52a9\u547d\u4ee4\u7684\u5feb\u6377\u952e\u662f&nbsp;<code>Ctrl+b ?<\/code>\u3002\u5b83\u7684\u7528\u6cd5\u662f\uff0c\u5728 Tmux \u7a97\u53e3\u4e2d\uff0c\u5148\u6309\u4e0b&nbsp;<code>Ctrl+b<\/code>\uff0c\u518d\u6309\u4e0b&nbsp;<code>?<\/code>\uff0c\u5c31\u4f1a\u663e\u793a\u5e2e\u52a9\u4fe1\u606f\u3002<\/p>\n\n\n\n<p>\u7136\u540e\uff0c\u6309\u4e0b ESC \u952e\u6216&nbsp;<code>q<\/code>\u952e\uff0c\u5c31\u53ef\u4ee5\u9000\u51fa\u5e2e\u52a9\u3002<\/p>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"scroller-8\">\u4e09\u3001\u4f1a\u8bdd\u7ba1\u7406<\/h1>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"scroller-9\">3.1 \u65b0\u5efa\u4f1a\u8bdd<\/h2>\n\n\n\n<p>\u7b2c\u4e00\u4e2a\u542f\u52a8\u7684 Tmux \u7a97\u53e3\uff0c\u7f16\u53f7\u662f&nbsp;<code>0<\/code>\uff0c\u7b2c\u4e8c\u4e2a\u7a97\u53e3\u7684\u7f16\u53f7\u662f&nbsp;<code>1<\/code>\uff0c\u4ee5\u6b64\u7c7b\u63a8\u3002\u8fd9\u4e9b\u7a97\u53e3\u5bf9\u5e94\u7684\u4f1a\u8bdd\uff0c\u5c31\u662f 0 \u53f7\u4f1a\u8bdd\u30011 \u53f7\u4f1a\u8bdd\u3002<\/p>\n\n\n\n<p>\u4f7f\u7528\u7f16\u53f7\u533a\u5206\u4f1a\u8bdd\uff0c\u4e0d\u592a\u76f4\u89c2\uff0c\u66f4\u597d\u7684\u65b9\u6cd5\u662f\u4e3a\u4f1a\u8bdd\u8d77\u540d\u3002<\/p>\n\n\n\n<pre id=\"copy_target_3\" class=\"wp-block-code\"><code>$ tmux new -s &lt;session-name&gt;\n<\/code><\/pre>\n\n\n\n<p>\u4e0a\u9762\u547d\u4ee4\u65b0\u5efa\u4e00\u4e2a\u6307\u5b9a\u540d\u79f0\u7684\u4f1a\u8bdd\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"scroller-10\">3.2 \u5206\u79bb\u4f1a\u8bdd<\/h2>\n\n\n\n<p>\u5728 Tmux \u7a97\u53e3\u4e2d\uff0c\u6309\u4e0b&nbsp;<code>Ctrl+b d<\/code>&nbsp;\u6216\u8005\u8f93\u5165&nbsp;<code>tmux detach<\/code>&nbsp;\u547d\u4ee4\uff0c\u5c31\u4f1a\u5c06\u5f53\u524d\u4f1a\u8bdd\u4e0e\u7a97\u53e3\u5206\u79bb\u3002<\/p>\n\n\n\n<pre id=\"copy_target_4\" class=\"wp-block-code\"><code>$ tmux detach\n<\/code><\/pre>\n\n\n\n<p>\u4e0a\u9762\u547d\u4ee4\u6267\u884c\u540e\uff0c\u5c31\u4f1a\u9000\u51fa\u5f53\u524d Tmux \u7a97\u53e3\uff0c\u4f46\u662f\u4f1a\u8bdd\u548c\u91cc\u9762\u7684\u8fdb\u7a0b\u4ecd\u7136\u5728\u540e\u53f0\u8fd0\u884c\u3002<\/p>\n\n\n\n<p><code>tmux ls<\/code>&nbsp;\u547d\u4ee4\u53ef\u4ee5\u67e5\u770b\u5f53\u524d\u6240\u6709\u7684 Tmux \u4f1a\u8bdd\u3002<\/p>\n\n\n\n<pre id=\"copy_target_5\" class=\"wp-block-code\"><code>$ tmux ls\n# or\n$ tmux list-session\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"scroller-11\">3.3 \u63a5\u5165\u4f1a\u8bdd<\/h2>\n\n\n\n<p><code>tmux attach<\/code>&nbsp;\u547d\u4ee4\u7528\u4e8e\u91cd\u65b0\u63a5\u5165\u67d0\u4e2a\u5df2\u5b58\u5728\u7684\u4f1a\u8bdd\u3002<\/p>\n\n\n\n<pre id=\"copy_target_6\" class=\"wp-block-code\"><code><em># \u4f7f\u7528\u4f1a\u8bdd\u7f16\u53f7<\/em>\n$ tmux attach -t 0\n\n<em># \u4f7f\u7528\u4f1a\u8bdd\u540d\u79f0<\/em>\n$ tmux attach -t &lt;session-name&gt;\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"scroller-12\">3.4 \u6740\u6b7b\u4f1a\u8bdd<\/h2>\n\n\n\n<p><code>tmux kill-session<\/code>&nbsp;\u547d\u4ee4\u7528\u4e8e\u6740\u6b7b\u67d0\u4e2a\u4f1a\u8bdd\u3002<\/p>\n\n\n\n<pre id=\"copy_target_7\" class=\"wp-block-code\"><code><em># \u4f7f\u7528\u4f1a\u8bdd\u7f16\u53f7<\/em>\n$ tmux kill-session -t 0\n\n<em># \u4f7f\u7528\u4f1a\u8bdd\u540d\u79f0<\/em>\n$ tmux kill-session -t &lt;session-name&gt;\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"scroller-13\">3.5 \u5207\u6362\u4f1a\u8bdd<\/h2>\n\n\n\n<p><code>tmux switch<\/code>&nbsp;\u547d\u4ee4\u7528\u4e8e\u5207\u6362\u4f1a\u8bdd\u3002<\/p>\n\n\n\n<pre id=\"copy_target_8\" class=\"wp-block-code\"><code><em># \u4f7f\u7528\u4f1a\u8bdd\u7f16\u53f7<\/em>\n$ tmux switch -t 0\n\n<em># \u4f7f\u7528\u4f1a\u8bdd\u540d\u79f0<\/em>\n$ tmux switch -t &lt;session-name&gt;\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"scroller-14\">3.6 \u91cd\u547d\u540d\u4f1a\u8bdd<\/h2>\n\n\n\n<p><code>tmux rename-session<\/code>&nbsp;\u547d\u4ee4\u7528\u4e8e\u91cd\u547d\u540d\u4f1a\u8bdd\u3002<\/p>\n\n\n\n<pre id=\"copy_target_9\" class=\"wp-block-code\"><code>$ tmux rename-session -t 0 &lt;new-name&gt;\n<\/code><\/pre>\n\n\n\n<p>\u4e0a\u9762\u547d\u4ee4\u5c060\u53f7\u4f1a\u8bdd\u91cd\u547d\u540d\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"scroller-15\">3.7 \u4f1a\u8bdd\u5feb\u6377\u952e<\/h2>\n\n\n\n<p>\u4e0b\u9762\u662f\u4e00\u4e9b\u4f1a\u8bdd\u76f8\u5173\u7684\u5feb\u6377\u952e\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Ctrl+b d\uff1a\u5206\u79bb\u5f53\u524d\u4f1a\u8bdd\u3002<\/li>\n\n\n\n<li>Ctrl+b s\uff1a\u5217\u51fa\u6240\u6709\u4f1a\u8bdd\u3002<\/li>\n\n\n\n<li>Ctrl+b $\uff1a\u91cd\u547d\u540d\u5f53\u524d\u4f1a\u8bdd\u3002<\/li>\n<\/ul>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"scroller-16\">\u56db\u3001\u6700\u7b80\u64cd\u4f5c\u6d41\u7a0b<\/h1>\n\n\n\n<p>\u7efc\u4e0a\u6240\u8ff0\uff0c\u4ee5\u4e0b\u662f Tmux \u7684\u6700\u7b80\u64cd\u4f5c\u6d41\u7a0b\u3002<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u65b0\u5efa\u4f1a\u8bddtmux new -s my_session\u3002<\/li>\n\n\n\n<li>\u5728 Tmux \u7a97\u53e3\u8fd0\u884c\u6240\u9700\u7684\u7a0b\u5e8f\u3002<\/li>\n\n\n\n<li>\u6309\u4e0b\u5feb\u6377\u952eCtrl+b d\u5c06\u4f1a\u8bdd\u5206\u79bb\u3002<\/li>\n\n\n\n<li>\u4e0b\u6b21\u4f7f\u7528\u65f6\uff0c\u91cd\u65b0\u8fde\u63a5\u5230\u4f1a\u8bddtmux attach-session -t my_session\u3002<\/li>\n<\/ol>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"scroller-17\">\u4e94\u3001\u7a97\u683c\u64cd\u4f5c<\/h1>\n\n\n\n<p>Tmux \u53ef\u4ee5\u5c06\u7a97\u53e3\u5206\u6210\u591a\u4e2a\u7a97\u683c\uff08pane\uff09\uff0c\u6bcf\u4e2a\u7a97\u683c\u8fd0\u884c\u4e0d\u540c\u7684\u547d\u4ee4\u3002\u4ee5\u4e0b\u547d\u4ee4\u90fd\u662f\u5728 Tmux \u7a97\u53e3\u4e2d\u6267\u884c\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"scroller-18\">5.1 \u5212\u5206\u7a97\u683c<\/h2>\n\n\n\n<p><code>tmux split-window<\/code>&nbsp;\u547d\u4ee4\u7528\u6765\u5212\u5206\u7a97\u683c\u3002<\/p>\n\n\n\n<pre id=\"copy_target_10\" class=\"wp-block-code\"><code><em># \u5212\u5206\u4e0a\u4e0b\u4e24\u4e2a\u7a97\u683c<\/em>\n$ tmux split-window\n\n<em># \u5212\u5206\u5de6\u53f3\u4e24\u4e2a\u7a97\u683c<\/em>\n$ tmux split-window -h\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/img2022.cnblogs.com\/blog\/1303876\/202203\/1303876-20220309102640922-873579187.png\" alt=\"\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"scroller-19\">5.2 \u79fb\u52a8\u5149\u6807<\/h2>\n\n\n\n<p><code>tmux select-pane<\/code>&nbsp;\u547d\u4ee4\u7528\u6765\u79fb\u52a8\u5149\u6807\u4f4d\u7f6e\u3002<\/p>\n\n\n\n<pre id=\"copy_target_11\" class=\"wp-block-code\"><code><em># \u5149\u6807\u5207\u6362\u5230\u4e0a\u65b9\u7a97\u683c<\/em>\n$ tmux select-pane -U\n\n<em># \u5149\u6807\u5207\u6362\u5230\u4e0b\u65b9\u7a97\u683c<\/em>\n$ tmux select-pane -D\n\n<em># \u5149\u6807\u5207\u6362\u5230\u5de6\u8fb9\u7a97\u683c<\/em>\n$ tmux select-pane -L\n\n<em># \u5149\u6807\u5207\u6362\u5230\u53f3\u8fb9\u7a97\u683c<\/em>\n$ tmux select-pane -R\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"scroller-20\">5.3 \u4ea4\u6362\u7a97\u683c\u4f4d\u7f6e<\/h2>\n\n\n\n<p><code>tmux swap-pane<\/code>&nbsp;\u547d\u4ee4\u7528\u6765\u4ea4\u6362\u7a97\u683c\u4f4d\u7f6e\u3002<\/p>\n\n\n\n<pre id=\"copy_target_12\" class=\"wp-block-code\"><code><em># \u5f53\u524d\u7a97\u683c\u4e0a\u79fb<\/em>\n$ tmux swap-pane -U\n\n<em># \u5f53\u524d\u7a97\u683c\u4e0b\u79fb<\/em>\n$ tmux swap-pane -D\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"scroller-21\">5.4 \u7a97\u683c\u5feb\u6377\u952e<\/h2>\n\n\n\n<p>\u4e0b\u9762\u662f\u4e00\u4e9b\u7a97\u683c\u64cd\u4f5c\u7684\u5feb\u6377\u952e\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Ctrl+b %\uff1a\u5212\u5206\u5de6\u53f3\u4e24\u4e2a\u7a97\u683c\u3002<\/li>\n\n\n\n<li>Ctrl+b &#8220;\uff1a\u5212\u5206\u4e0a\u4e0b\u4e24\u4e2a\u7a97\u683c\u3002<\/li>\n\n\n\n<li>Ctrl+b\u00a0\uff1a\u5149\u6807\u5207\u6362\u5230\u5176\u4ed6\u7a97\u683c\u3002\u662f\u6307\u5411\u8981\u5207\u6362\u5230\u7684\u7a97\u683c\u7684\u65b9\u5411\u952e\uff0c\u6bd4\u5982\u5207\u6362\u5230\u4e0b\u65b9\u7a97\u683c\uff0c\u5c31\u6309\u65b9\u5411\u952e\u2193\u3002<\/li>\n\n\n\n<li>Ctrl+b ;\uff1a\u5149\u6807\u5207\u6362\u5230\u4e0a\u4e00\u4e2a\u7a97\u683c\u3002<\/li>\n\n\n\n<li>Ctrl+b o\uff1a\u5149\u6807\u5207\u6362\u5230\u4e0b\u4e00\u4e2a\u7a97\u683c\u3002<\/li>\n\n\n\n<li>Ctrl+b {\uff1a\u5f53\u524d\u7a97\u683c\u4e0e\u4e0a\u4e00\u4e2a\u7a97\u683c\u4ea4\u6362\u4f4d\u7f6e\u3002<\/li>\n\n\n\n<li>Ctrl+b }\uff1a\u5f53\u524d\u7a97\u683c\u4e0e\u4e0b\u4e00\u4e2a\u7a97\u683c\u4ea4\u6362\u4f4d\u7f6e\u3002<\/li>\n\n\n\n<li>Ctrl+b Ctrl+o\uff1a\u6240\u6709\u7a97\u683c\u5411\u524d\u79fb\u52a8\u4e00\u4e2a\u4f4d\u7f6e\uff0c\u7b2c\u4e00\u4e2a\u7a97\u683c\u53d8\u6210\u6700\u540e\u4e00\u4e2a\u7a97\u683c\u3002<\/li>\n\n\n\n<li>Ctrl+b Alt+o\uff1a\u6240\u6709\u7a97\u683c\u5411\u540e\u79fb\u52a8\u4e00\u4e2a\u4f4d\u7f6e\uff0c\u6700\u540e\u4e00\u4e2a\u7a97\u683c\u53d8\u6210\u7b2c\u4e00\u4e2a\u7a97\u683c\u3002<\/li>\n\n\n\n<li>Ctrl+b x\uff1a\u5173\u95ed\u5f53\u524d\u7a97\u683c\u3002<\/li>\n\n\n\n<li>Ctrl+b !\uff1a\u5c06\u5f53\u524d\u7a97\u683c\u62c6\u5206\u4e3a\u4e00\u4e2a\u72ec\u7acb\u7a97\u53e3\u3002<\/li>\n\n\n\n<li>Ctrl+b z\uff1a\u5f53\u524d\u7a97\u683c\u5168\u5c4f\u663e\u793a\uff0c\u518d\u4f7f\u7528\u4e00\u6b21\u4f1a\u53d8\u56de\u539f\u6765\u5927\u5c0f\u3002<\/li>\n\n\n\n<li>Ctrl+b Ctrl+\uff1a\u6309\u7bad\u5934\u65b9\u5411\u8c03\u6574\u7a97\u683c\u5927\u5c0f\u3002<\/li>\n\n\n\n<li>Ctrl+b q\uff1a\u663e\u793a\u7a97\u683c\u7f16\u53f7\u3002<\/li>\n<\/ul>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"scroller-22\">\u516d\u3001\u7a97\u53e3\u7ba1\u7406<\/h1>\n\n\n\n<p>\u9664\u4e86\u5c06\u4e00\u4e2a\u7a97\u53e3\u5212\u5206\u6210\u591a\u4e2a\u7a97\u683c\uff0cTmux \u4e5f\u5141\u8bb8\u65b0\u5efa\u591a\u4e2a\u7a97\u53e3\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"scroller-23\">6.1 \u65b0\u5efa\u7a97\u53e3<\/h2>\n\n\n\n<p><code>tmux new-window<\/code>&nbsp;\u547d\u4ee4\u7528\u6765\u521b\u5efa\u65b0\u7a97\u53e3\u3002<\/p>\n\n\n\n<pre id=\"copy_target_13\" class=\"wp-block-code\"><code>$ tmux new-window\n\n# \u65b0\u5efa\u4e00\u4e2a\u6307\u5b9a\u540d\u79f0\u7684\u7a97\u53e3\n$ tmux new-window -n &lt;window-name&gt;\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"scroller-24\">6.2 \u5207\u6362\u7a97\u53e3<\/h2>\n\n\n\n<p><code>tmux select-window<\/code>&nbsp;\u547d\u4ee4\u7528\u6765\u5207\u6362\u7a97\u53e3\u3002<\/p>\n\n\n\n<pre id=\"copy_target_14\" class=\"wp-block-code\"><code># \u5207\u6362\u5230\u6307\u5b9a\u7f16\u53f7\u7684\u7a97\u53e3\n$ tmux select-window -t &lt;window-number&gt;\n\n# \u5207\u6362\u5230\u6307\u5b9a\u540d\u79f0\u7684\u7a97\u53e3\n$ tmux select-window -t &lt;window-name&gt;\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"scroller-25\">6.3 \u91cd\u547d\u540d\u7a97\u53e3<\/h2>\n\n\n\n<p><code>tmux rename-window<\/code>&nbsp;\u547d\u4ee4\u7528\u4e8e\u4e3a\u5f53\u524d\u7a97\u53e3\u8d77\u540d\uff08\u6216\u91cd\u547d\u540d\uff09\u3002<\/p>\n\n\n\n<pre id=\"copy_target_15\" class=\"wp-block-code\"><code>$ tmux rename-window &lt;new-name&gt;\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"scroller-26\">6.4 \u7a97\u53e3\u5feb\u6377\u952e<\/h2>\n\n\n\n<p>\u4e0b\u9762\u662f\u4e00\u4e9b\u7a97\u53e3\u64cd\u4f5c\u7684\u5feb\u6377\u952e\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Ctrl+b c\uff1a\u521b\u5efa\u4e00\u4e2a\u65b0\u7a97\u53e3\uff0c\u72b6\u6001\u680f\u4f1a\u663e\u793a\u591a\u4e2a\u7a97\u53e3\u7684\u4fe1\u606f\u3002<\/li>\n\n\n\n<li>Ctrl+b p\uff1a\u5207\u6362\u5230\u4e0a\u4e00\u4e2a\u7a97\u53e3\uff08\u6309\u7167\u72b6\u6001\u680f\u4e0a\u7684\u987a\u5e8f\uff09\u3002<\/li>\n\n\n\n<li>Ctrl+b n\uff1a\u5207\u6362\u5230\u4e0b\u4e00\u4e2a\u7a97\u53e3\u3002<\/li>\n\n\n\n<li>Ctrl+b\u00a0\uff1a\u5207\u6362\u5230\u6307\u5b9a\u7f16\u53f7\u7684\u7a97\u53e3\uff0c\u5176\u4e2d\u7684\u662f\u72b6\u6001\u680f\u4e0a\u7684\u7a97\u53e3\u7f16\u53f7\u3002<\/li>\n\n\n\n<li>Ctrl+b w\uff1a\u4ece\u5217\u8868\u4e2d\u9009\u62e9\u7a97\u53e3\u3002<\/li>\n\n\n\n<li>Ctrl+b ,\uff1a\u7a97\u53e3\u91cd\u547d\u540d\u3002<\/li>\n<\/ul>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"scroller-27\">\u4e03\u3001\u5176\u4ed6\u547d\u4ee4<\/h1>\n\n\n\n<p>\u4e0b\u9762\u662f\u4e00\u4e9b\u5176\u4ed6\u547d\u4ee4\u3002<\/p>\n\n\n\n<pre id=\"copy_target_16\" class=\"wp-block-code\"><code># \u5217\u51fa\u6240\u6709\u5feb\u6377\u952e\uff0c\u53ca\u5176\u5bf9\u5e94\u7684 Tmux \u547d\u4ee4\n$ tmux list-keys\n\n# \u5217\u51fa\u6240\u6709 Tmux \u547d\u4ee4\u53ca\u5176\u53c2\u6570\n$ tmux list-commands\n\n# \u5217\u51fa\u5f53\u524d\u6240\u6709 Tmux \u4f1a\u8bdd\u7684\u4fe1\u606f\n$ tmux info\n\n# \u91cd\u65b0\u52a0\u8f7d\u5f53\u524d\u7684 Tmux \u914d\u7f6e\n$ tmux source-file ~\/.tmux.conf\n<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"scroller-28\">\u53c2\u8003\u8d44\u6599<\/h1>\n\n\n\n<p><a href=\"https:\/\/www.ruanyifeng.com\/blog\/2019\/10\/tmux.html\">https:\/\/www.ruanyifeng.com\/blog\/2019\/10\/tmux.html<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/www.cnblogs.com\/niuben\/p\/15983908.html\">linux tmux \u4f7f\u7528\u6559\u7a0b &#8211; \u725b\u5954 &#8211; \u535a\u5ba2\u56ed<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001Tmux \u662f\u4ec0\u4e48\uff1f 1.1 \u4f1a\u8bdd\u4e0e\u8fdb\u7a0b \u547d\u4ee4\u884c\u7684\u5178\u578b\u4f7f\u7528\u65b9\u5f0f\u662f\uff0c\u6253\u5f00\u4e00\u4e2a\u7ec8\u7aef\u7a97\u53e3\uff08terminal win [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":0,"parent":182,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","categories":[],"doc_label":[],"doc_tag":[],"class_list":["post-304","docs","type-docs","status-publish","format-standard","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.liuyaorobot.com\/index.php?rest_route=\/wp\/v2\/docs\/304","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/docs.liuyaorobot.com\/index.php?rest_route=\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/docs.liuyaorobot.com\/index.php?rest_route=\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/docs.liuyaorobot.com\/index.php?rest_route=\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.liuyaorobot.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=304"}],"version-history":[{"count":2,"href":"https:\/\/docs.liuyaorobot.com\/index.php?rest_route=\/wp\/v2\/docs\/304\/revisions"}],"predecessor-version":[{"id":307,"href":"https:\/\/docs.liuyaorobot.com\/index.php?rest_route=\/wp\/v2\/docs\/304\/revisions\/307"}],"up":[{"embeddable":true,"href":"https:\/\/docs.liuyaorobot.com\/index.php?rest_route=\/wp\/v2\/docs\/182"}],"wp:attachment":[{"href":"https:\/\/docs.liuyaorobot.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=304"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.liuyaorobot.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=304"},{"taxonomy":"doc_label","embeddable":true,"href":"https:\/\/docs.liuyaorobot.com\/index.php?rest_route=%2Fwp%2Fv2%2Fdoc_label&post=304"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/docs.liuyaorobot.com\/index.php?rest_route=%2Fwp%2Fv2%2Fdoc_tag&post=304"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}