{"id":5231,"date":"2025-07-10T18:06:20","date_gmt":"2025-07-10T09:06:20","guid":{"rendered":"https:\/\/zeoninc.com\/blog\/?p=5231"},"modified":"2025-07-10T18:06:27","modified_gmt":"2025-07-10T09:06:27","slug":"july2-4","status":"publish","type":"post","link":"https:\/\/zeoninc.com\/blog\/2025\/07\/10\/july2-4\/","title":{"rendered":"GNU screen \u304b\u3089 tmux \u306b\u4e57\u308a\u63db\u3048\u3066\u307f\u308b"},"content":{"rendered":"\n<p>\u958b\u767a\u90e8\u306eSS\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u4eca\u56de\u306f\u30bf\u30fc\u30df\u30ca\u30eb\u30de\u30eb\u30c1\u30d7\u30ec\u30af\u30b5\u306eGNU screen\u3068tmux\u306b\u3064\u3044\u3066\u3067\u3059\u3002<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u30bf\u30fc\u30df\u30ca\u30eb\u30de\u30eb\u30c1\u30d7\u30ec\u30af\u30b5\u3068\u306f\uff1f<\/h2>\n\n\n\n<p>screen \u3084 tmux \u306f\u30011\u3064\u306e\u30bf\u30fc\u30df\u30ca\u30eb\u4e0a\u3067\u8907\u6570\u306e\u4eee\u60f3\u7aef\u672b\uff08\u30bb\u30c3\u30b7\u30e7\u30f3\uff09\u3092\u7ba1\u7406\u3067\u304d\u308b\u30c4\u30fc\u30eb\u3067\u3059\u3002<br>SSH\u63a5\u7d9a\u4e2d\u306e\u4f5c\u696d\u3092\u4e2d\u65ad\u30fb\u518d\u958b\u3057\u305f\u308a\u3001\u8907\u6570\u306e\u30a6\u30a3\u30f3\u30c9\u30a6\u3092\u540c\u6642\u306b\u958b\u3044\u3066\u4f5c\u696d\u3059\u308b\u306e\u306b\u4fbf\u5229\u3067\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u30bf\u30fc\u30df\u30ca\u30eb\u30de\u30eb\u30c1\u30d7\u30ec\u30af\u30b5\u306e\u30e1\u30ea\u30c3\u30c8<\/h3>\n\n\n\n<ul>\n<li>\u30bb\u30c3\u30b7\u30e7\u30f3\u306e\u518d\u63a5\u7d9a\u304c\u53ef\u80fd\n<ul>\n<li>SSH\u304c\u5207\u65ad\u3055\u308c\u3066\u3082\u3001\u4f5c\u696d\u4e2d\u306e\u30d7\u30ed\u30bb\u30b9\u306f\u751f\u304d\u3066\u3044\u3066 screen -r \u3084 tmux attach \u3067\u518d\u63a5\u7d9a\u3067\u304d\u307e\u3059\u3002<\/li>\n\n\n\n<li>\u9577\u6642\u9593\u306e\u51e6\u7406\uff08\u30d3\u30eb\u30c9\u3001DB\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u306a\u3069\uff09\u306b\u3082\u5b89\u5fc3\u3002<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>\u8907\u6570\u30a6\u30a3\u30f3\u30c9\u30a6\u30fb\u30da\u30a4\u30f3\u306e\u5206\u5272\n<ul>\n<li>\u4e00\u3064\u306e\u753b\u9762\u5185\u3067\u7e26\u6a2a\u306b\u5206\u5272\u3057\u3066\u3001\u8907\u6570\u306e\u4f5c\u696d\u3092\u4e26\u884c\u3057\u3066\u9032\u3081\u3089\u308c\u307e\u3059\uff08\u7279\u306btmux\u304c\u9ad8\u6a5f\u80fd\uff09\u3002<\/li>\n\n\n\n<li>\u4f8b\uff1a\u5de6\u306b\u30ed\u30b0\u3001\u53f3\u306b\u30a8\u30c7\u30a3\u30bf\u3001\u4e0b\u306b\u5bfe\u8a71\u30b7\u30a7\u30eb\u306a\u3069\u3002<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>\u30bb\u30c3\u30b7\u30e7\u30f3\u5171\u6709\n<ul>\n<li>\u8907\u6570\u4eba\u3067\u540c\u3058tmux\u30bb\u30c3\u30b7\u30e7\u30f3\u306b\u53c2\u52a0\u3059\u308c\u3070\u3001\u9060\u9694\u30da\u30a2\u30d7\u30ed\u30fb\u6559\u80b2\u306a\u3069\u306b\u3082\u4f7f\u3048\u308b\u3002<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>\u30ed\u30b0\u3092\u53d6\u308a\u3084\u3059\u3044\n<ul>\n<li>\u9577\u3044\u51e6\u7406\u306e\u7d50\u679c\u78ba\u8a8d\u3084\u30c8\u30e9\u30d6\u30eb\u30b7\u30e5\u30fc\u30c8\u306b\u4fbf\u5229\u3002<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>\u8efd\u91cf\u30fbCUI\u306e\u307f\u3067\u5b8c\u7d50\n<ul>\n<li>GUI\u4e0d\u8981\u3001SSH\u63a5\u7d9a\u3060\u3051\u3067OK\u3002\u3069\u3093\u306aLinux\u30b5\u30fc\u30d0\u306b\u3082\u5c0e\u5165\u3057\u3084\u3059\u3044\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">screen \u304b\u3089 tmux \u306b\u5207\u308a\u66ff\u3048\u3092\u691c\u8a0e\u3057\u3066\u3044\u308b\u7406\u7531<\/h2>\n\n\n\n<p>\u4eca\u5f8c\u3082\u4f1d\u7d71\u7684\u306aGNU screen \u3092\u4f7f\u3063\u3066\u3044\u3053\u3046\u3068\u8003\u3048\u3066\u3044\u305f\u306e\u3067\u3059\u304c\u3001<br>\u6700\u8fd1\u8a71\u984c\u306eClaude Code\u3092\u8a66\u3057\u3066\u307f\u305f\u3068\u3053\u308d\u3001\u30bf\u30fc\u30df\u30ca\u30eb\u306e\u8868\u793a\u304c\u5927\u304d\u304f\u5d29\u308c\u3066\u3057\u307e\u3046\u3053\u3068\u304c\u5206\u304b\u308a\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p>screen \u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306fMacOS\u7248\u306e<br>Screen version 5.0.1 (build on 2025-05-15 15:05:07)<br>\u3067\u3001\u65b0\u3057\u3044\u3068\u601d\u3046\u306e\u3067\u3059\u304c\u3001 .screenrc \u3092\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3082\u4f55\u3082\u3057\u306a\u3044\u72b6\u614b\u3067 Claude Code\u306e\u30ec\u30a4\u30a2\u30a6\u30c8\u304c\u5927\u304d\u304f\u5d29\u308c\u3066\u3057\u307e\u3063\u3066\u3044\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p>\u305d\u3053\u3067\u3001\u4ee3\u308f\u308a\u306b tmux \u3092\u8a66\u3057\u3066\u307f\u305f\u3068\u3053\u308d\u3001\u7279\u306b\u554f\u984c\u3082\u306a\u304f\u6b63\u5e38\u306b\u8868\u793a\u3055\u308c\u3001\u5feb\u9069\u306b\u4f7f\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3057\u305f\u3002<br>\u3053\u306e\u7d4c\u9a13\u304b\u3089\u3001\u4eca\u5f8c\u306f tmux \u3078\u306e\u79fb\u884c\u3082\u8996\u91ce\u306b\u5165\u308c\u3088\u3046\u3068\u8003\u3048\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">screen\u4f7f\u3044\u304c tmux \u306b\u5207\u308a\u66ff\u3048\u3066\u306e\u611f\u60f3<\/h2>\n\n\n\n<p>\u9577\u5e74 GNU screen \u3092\u4f7f\u3044\u8fbc\u3093\u3067\u304d\u305f\u3053\u3068\u3082\u3042\u308a\u3001tmux \u306e\u30ad\u30fc\u30d0\u30a4\u30f3\u30c9\u306b\u306f\u6700\u521d\u5c11\u3057\u6238\u60d1\u3044\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p>\u73fe\u5728\u3082\u5225\u306e\u74b0\u5883\u3067\u306f screen \u3092\u4f7f\u3063\u3066\u3044\u308b\u305f\u3081\u3001tmux \u3067\u3082\u53ef\u80fd\u306a\u7bc4\u56f2\u3067 screen \u306e\u64cd\u4f5c\u611f\u306b\u8fd1\u3065\u3051\u308b\u3088\u3046\u3001\u5fc5\u8981\u6700\u5c0f\u9650\u306e\u8a2d\u5b9a\u3060\u3051\u52a0\u3048\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p>\u3053\u3053\u3067\u306f\u3001\u305d\u306e\u4e2d\u3067\u3044\u304f\u3064\u304b\u5909\u66f4\u3057\u305f\u30dd\u30a4\u30f3\u30c8\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u307e\u3060\u4f7f\u3044\u59cb\u3081\u3066\u6570\u65e5\u3067\u3059\u304c\u3001\u53d6\u308a\u6025\u304e\u306e .tmux.conf \u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Emacs\u98a8\u306e\u30ad\u30fc\u30d0\u30a4\u30f3\u30c9\u306b\u5909\u66f4<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code># prefix \u30ad\u30fc\u3092 Ctrl-z \u306b\u5909\u66f4\uff08Ctrl-b \u3092\u7121\u52b9\u5316\uff09\nunbind C-b\nset-option -g prefix C-z\nbind C-z send-prefix<\/code><\/pre>\n\n\n\n<p>tmux \u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30d0\u30a4\u30f3\u30c9\u30ad\u30fc\u306f Ctrl-b \u3067\u3059\u304c\u3001\u81ea\u5206\u306f Emacs \u30e6\u30fc\u30b6\u30fc\u306a\u306e\u3067 Ctrl-b \u306f\u300c1\u6587\u5b57\u623b\u308b\u300d\u30ad\u30fc\u3068\u3057\u3066\u4f7f\u3044\u305f\u3044\u6d3e\u3067\u3059\u3002\u305d\u306e\u305f\u3081\u3001\u30d7\u30ec\u30d5\u30a3\u30c3\u30af\u30b9\u30ad\u30fc\u306f Ctrl-z \u306b\u5909\u66f4\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p>\u53c2\u8003\u307e\u3067\u306b\u3001Emacs \u306e\u4e3b\u306a\u30ab\u30fc\u30bd\u30eb\u79fb\u52d5\u7528\u30ad\u30fc\u30d0\u30a4\u30f3\u30c9\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Ctrl-f : 1\u6587\u5b57\u53f3\nCtrl-b : 1\u6587\u5b57\u5de6\nCtrl-p : 1\u884c\u4e0a\nCtrl-n : 1\u884c\u4e0b\nCtrl-a : \u884c\u306e\u5148\u982d\nCtrl-e : \u884c\u306e\u672b\u5c3e<\/code><\/pre>\n\n\n\n<p>\u3053\u306e\u8a2d\u5b9a\u306b\u3088\u3063\u3066\u3001tmux \u4e0a\u3067\u3082\u666e\u6bb5\u306e Emacs \u3068\u540c\u69d8\u306e\u64cd\u4f5c\u611f\u304c\u4fdd\u3066\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">screen\u98a8\u306e\u30b3\u30d4\u30fc\u30e2\u30fc\u30c9\u306b\u5909\u66f4<\/h2>\n\n\n\n<p>\u5927\u91cf\u306e\u30ed\u30b0\u3092\u8ffd\u3046\u3068\u304d\u306a\u3069\u306b\u4fbf\u5229\u306a\u300c\u30b3\u30d4\u30fc\u30e2\u30fc\u30c9\u300d\u3067\u3059\u304c\u3001tmux \u3067\u306f screen \u3068\u306f\u64cd\u4f5c\u65b9\u6cd5\u304c\u3084\u3084\u7570\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u7279\u306b\u4ee5\u4e0b\u306e\u64cd\u4f5c\u3092 screen \u98a8\u306b\u3057\u305f\u304b\u3063\u305f\u306e\u3067\u3001\u8a2d\u5b9a\u3092\u8ffd\u52a0\u3057\u307e\u3057\u305f\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># \u30b3\u30d4\u30fc\u30e2\u30fc\u30c9\u306e Emacs \u30e9\u30a4\u30af\u306a\u30ad\u30fc\u8a2d\u5b9a\nbind -T copy-mode C-u send-keys -X halfpage-up\nbind -T copy-mode C-d send-keys -X halfpage-down<\/code><\/pre>\n\n\n\n<p>\u3053\u308c\u306b\u3088\u308a\u3001<\/p>\n\n\n\n<p>Ctrl-u : \u534a\u753b\u9762\u4e0a\u306b\u79fb\u52d5<br>Ctrl-d : \u534a\u753b\u9762\u4e0b\u306b\u79fb\u52d5<\/p>\n\n\n\n<p>\u3068\u3044\u3046\u52d5\u4f5c\u304c\u53ef\u80fd\u306b\u306a\u308a\u3001screen \u3068\u8fd1\u3044\u611f\u899a\u3067\u4f7f\u3048\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u4eca\u306e\u3068\u3053\u308d\u89e6\u3063\u3066\u6570\u65e5\u3067\u3059\u304c\u3001\u5fc5\u8981\u306a\u90e8\u5206\u304b\u3089\u5c11\u3057\u305a\u3064\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3057\u3066\u3044\u304f\u3053\u3068\u3067\u3001tmux \u306b\u3082\u3060\u3093\u3060\u3093\u3068\u6163\u308c\u3066\u304d\u307e\u3057\u305f\u3002<br>\u4eca\u5f8c\u3082\u4f7f\u3044\u306a\u304c\u3089\u3001\u3055\u3089\u306b\u81ea\u5206\u597d\u307f\u306b\u8abf\u6574\u3057\u3066\u3044\u304d\u305f\u3044\u3068\u8003\u3048\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u305d\u308c\u3067\u306f\u3002<\/p>\n\n\n\n<p>\u6587\uff1a\u958b\u767a\u90e8SS<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u958b\u767a\u90e8\u306eSS\u3067\u3059\u3002 \u4eca\u56de\u306f\u30bf\u30fc\u30df\u30ca\u30eb\u30de\u30eb\u30c1\u30d7\u30ec\u30af\u30b5\u306eGNU screen\u3068tmux\u306b\u3064\u3044\u3066\u3067\u3059\u3002 \u30bf\u30fc\u30df\u30ca\u30eb\u30de\u30eb\u30c1\u30d7\u30ec\u30af\u30b5\u3068\u306f\uff1f screen \u3084 tmux \u306f\u30011\u3064\u306e\u30bf\u30fc\u30df\u30ca\u30eb\u4e0a\u3067\u8907\u6570\u306e\u4eee\u60f3\u7aef\u672b\uff08\u30bb\u30c3\u30b7\u30e7\u30f3\uff09\u3092\u7ba1\u7406\u3067\u304d [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":5232,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[31,8],"tags":[75,76],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/zeoninc.com\/blog\/wp-json\/wp\/v2\/posts\/5231"}],"collection":[{"href":"https:\/\/zeoninc.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zeoninc.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zeoninc.com\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/zeoninc.com\/blog\/wp-json\/wp\/v2\/comments?post=5231"}],"version-history":[{"count":6,"href":"https:\/\/zeoninc.com\/blog\/wp-json\/wp\/v2\/posts\/5231\/revisions"}],"predecessor-version":[{"id":5239,"href":"https:\/\/zeoninc.com\/blog\/wp-json\/wp\/v2\/posts\/5231\/revisions\/5239"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/zeoninc.com\/blog\/wp-json\/wp\/v2\/media\/5232"}],"wp:attachment":[{"href":"https:\/\/zeoninc.com\/blog\/wp-json\/wp\/v2\/media?parent=5231"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zeoninc.com\/blog\/wp-json\/wp\/v2\/categories?post=5231"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zeoninc.com\/blog\/wp-json\/wp\/v2\/tags?post=5231"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}