====== tmux ====== < prefix > のdefault:ctrl+b ===== install ===== # pkg install tmux ===== セッション ===== ==== 新規セッション ==== tmux tmux new [-s session名] ==== アタッチ ==== tmux a tmux a [-t session名] ==== デタッチ ==== < Prefix > + d ==== セッション名変更 ==== tmux rename -t (旧session名) (新session名) < Prefix > + $ ==== セッションの削除 ==== tmux kill-session tmux kill-session -t (session名) tmux kill-server # 全部kill ==== セッションの一覧選択 ==== < Prefix > + s ===== ウィンドウ ===== ==== 新規ウィンドウ ==== < Prefix > -> c ==== ウィンドウの切り替え ==== < Prefix > -> ウィンドウ番号 ==== ウィンドウ一覧 ==== < Prefix > -> w ==== ウィンドウ削除 ==== < Prefix > -> & ==== ウィンドウの名前付け ==== < Prefix > -> , ===== ペイン ===== ==== 水平分割 ==== < Prefix > -> " ==== 垂直分割 ==== < Prefix > -> % ==== 移動 ==== < Prefix > -> o or < Prefix > -> q < Prefix > -> q -> インジケータ番号 ==== 分割解除 ==== 現在いるペインが消える < Prefix > -> x ==== サイズ変更 ==== < Prefix > -> Space ペインレイアウトの変更((思い通りになるまで連打)) ==== 複数のペインに対して同時にコマンドを実行 ==== ON < Prefix > -> :set-window-option synchronize-panes on -> Enter OFF < Prefix > -> :set-window-option synchronize-panes off -> Enter < Prefix > -> a にバインド .tmux.conf bind a setw synchronize-panes \; display "synchronize-panes #{?pane_synchronized,on,off}" === 参考 === * [[https://qiita.com/waieneiaw/items/22ed18809739c9a69f25|tmuxのsynchronize-panesをtoggle化する方法]] ===== スクロール ===== < Prefix > -> [ これで、スクロールモード PgUp、PgDnまたは矢印で移動 抜ける時は q ===== 日本語 ===== 日本語であるべきところがアンダースコア(_)になっていて表示されないときは、tmuxをutf8モードで起動 $ tmux -u ===== 参考 ===== * [[https://qiita.com/nmrmsys/items/03f97f5eabec18a3a18b|tmuxチートシート]] * [[https://gihyo.jp/admin/serial/01/ubuntu-recipe/0127?page=1|ターミナルマルチプレクサ tmuxを使ってみよう]] * [[https://gihyo.jp/admin/serial/01/ubuntu-recipe/0292?page=1|.tmux.confの設定をしてみよう]] * [[https://mynavi-agent.jp/it/geekroid/2017/03/-11tmux.html]]