スキップしてメイン コンテンツに移動

tmux の 操作


tmux (https://github.com/tmux/tmux) の操作

マニュアルにキー操作が書いてある。
$ man tmux

KEY BINDINGS
tmux may be controlled from an attached client by using a key combination of a prefix key, ‘C-b’ (Ctrl-b) by default, followed by a command key.
The default command key bindings are:

       C-b         Send the prefix key (C-b) through to the application.
       C-o         Rotate the panes in the current window forwards.
       C-z         Suspend the tmux client.
       !           Break the current pane out of the window.
       "           Split the current pane into two, top and bottom.
       #           List all paste buffers.
       $           Rename the current session.
       %           Split the current pane into two, left and right.
       &           Kill the current window.
       '           Prompt for a window index to select.
       (           Switch the attached client to the previous session.
       )           Switch the attached client to the next session.
       ,           Rename the current window.
       -           Delete the most recently copied buffer of text.
       .           Prompt for an index to move the current window.
       0 to 9      Select windows 0 to 9.
       :           Enter the tmux command prompt.
       ;           Move to the previously active pane.
       =           Choose which buffer to paste interactively from a list.
       ?           List all key bindings.
       D           Choose a client to detach.
       L           Switch the attached client back to the last session.
       [           Enter copy mode to copy text or view the history.
       ]           Paste the most recently copied buffer of text.
       c           Create a new window.
       d           Detach the current client.
       f           Prompt to search for text in open windows.
       i           Display some information about the current window.
       l           Move to the previously selected window.
       n           Change to the next window.
       o           Select the next pane in the current window.
       p           Change to the previous window.
       q           Briefly display pane indexes.
       r           Force redraw of the attached client.
       m           Mark the current pane (see select-pane -m).
       M           Clear the marked pane.
       s           Select a new session for the attached client interactively.
       t           Show the time.
       w           Choose the current window interactively.
       x           Kill the current pane.
       z           Toggle zoom state of the current pane.
       {           Swap the current pane with the previous pane.
       }           Swap the current pane with the next pane.
       ~           Show previous messages from tmux, if any.
       Page Up     Enter copy mode and scroll one page up.
       Up, Down
       Left, Right
                   Change to the pane above, below, to the left, or to the right of the current pane.
       M-1 to M-5  Arrange panes in one of the five preset layouts: even-horizontal, even-vertical, main-hori‐
                   zontal, main-vertical, or tiled.
       Space       Arrange the current window in the next preset layout.
       M-n         Move to the next window with a bell or activity marker.
       M-o         Rotate the panes in the current window backwards.
       M-p         Move to the previous window with a bell or activity marker.
       C-Up, C-Down
       C-Left, C-Right
                   Resize the current pane in steps of one cell.
       M-Up, M-Down
       M-Left, M-Right
                   Resize the current pane in steps of five cells.

 Key bindings may be changed with the bind-key and unbind-key commands.



Googleで翻訳してみた

コマンド 説明
C-b プレフィックスキー(C-b)をアプリケーションに送信します。
C-o 現在のウィンドウのペインを前方に回転させます。
C-z tmuxクライアントを中断します。
! 現在のペインをウィンドウから切り離します。
" 現在のペインを上部と下部の2つに分割します。
# すべての貼り付けバッファーを一覧表示します。
$ 現在のセッションの名前を変更します。
% 現在のペインを左右に2つに分割します。
& 現在のウィンドウを強制終了します。
選択するウィンドウインデックスの入力を求めます。
( 接続されたクライアントを前のセッションに切り替えます。
) 接続されているクライアントを次のセッションに切り替えます。
, 現在のウィンドウの名前を変更します。
- 最後にコピーされたテキストのバッファーを削除します。
. 現在のウィンドウを移動するためのインデックスを要求します。
0 to 9 ウィンドウ0?9を選択します。
: tmuxコマンドプロンプトを入力します。
; 以前にアクティブだったペインに移動します。
= リストからインタラクティブに貼り付けるバッファを選択します。
? すべてのキーバインドを一覧表示します。
D デタッチするクライアントを選択します。
L 接続されたクライアントを最後のセッションに切り替えます。
[ コピーモードを開始して、テキストをコピーするか、履歴を表示します。
] 最後にコピーしたテキストのバッファーを貼り付けます。
c 新しいウィンドウを作成します。
d 現在のクライアントを切断します。
f 開いているウィンドウでテキストを検索するプロンプト。
i 現在のウィンドウに関する情報を表示します。
l 以前に選択したウィンドウに移動します。
n 次のウィンドウに変更します。
o 現在のウィンドウの次のペインを選択します。
p 前のウィンドウに変更します。
q ペインインデックスを簡単に表示します。
r 接続されたクライアントを強制的に再描画します。
m 現在のペインをマークします(select-pane -mを参照)。
M マークされたペインをクリアします。
s 接続されたクライアントの新しいセッションをインタラクティブに選択します。
t 時間を表示します。
w 現在のウィンドウをインタラクティブに選択します。
x 現在のペインを強制終了します。
z 現在のペインのズーム状態を切り替えます。
{ 現在のペインを前のペインと交換します。
} 現在のペインを次のペインと交換します。
~ tmuxからの以前のメッセージがあれば、それを表示します。
Page Up コピーモードに入り、1ページ上にスクロールします。
Up, Down,
Left, Right
現在のペインの上、下、左、または右のペインに変更します。
M-1 to M-5 5つのプリセットレイアウトのいずれかでペインを配置します。偶数水平、偶数垂直、メイン水平、メイン垂直、またはタイルです。
Space 次のプリセットレイアウトで現在のウィンドウを配置します。
M-n ベルまたはアクティビティマーカーがある次のウィンドウに移動します。
M-o 現在のウィンドウのペインを後方に回転します。
M-p ベルまたはアクティビティマーカーで前のウィンドウに移動します。
C-Up, C-Down,
C-Left, C-Right
現在のペインのサイズを1セルずつ変更します。
M-Up, M-Down,
M-Left, M-Right
5つのセルのステップで現在のペインのサイズを変更します。

コメント

このブログの人気の投稿

Ubuntu で RAIDディスクをマウントする

謎のHDDが見つかった。 データを確認するためWindowsにつなぐもマウントされず。 これは extとかffsの辺りかなと思い、Linux(Ubuntu)に繋ぐ。 しかし、自動マウントされない。 取り敢えずマウントする。 # mount /dev/sdb1 /mnt/disk すると'linux_raid_member'とエラー表示された。 ということで、まずファイルシステムを確認。 # parted -l このコマンドでファイルシステムが表示される。 また、Gparted でも表示される。 そこでRAIDディスクを扱うためにmdadmパッケージをインストール。 # apt install mdadm ネットでは mountコマンドの -t オプションで明示的にファイルシステムを指定するとマウントできると書いてあったのでそれを試すとマウントできた。 # mount -t ext3 /dev/sdb1 /mnt/disk 内容を確認すると不要なデータだったのでデータを削除する。 # shred -v /deb/sdb この処理はとても時間がかかるので普段使わないコンピュータで処理をした。

自動ログイン on Lubuntu

Lubuntu 19.04 の 自動ログインを設定してみた。 グラフィカルログインを自動で行うようにしたいが、 ユーザー設定 の中に自動ログインの設定がない。 そこでコマンドラインから設定してみた。 まず、ログインをするときに使用しているディスプレイマネージャを確認する。 $ cat /etc/X11/default-display-manager /usr/bin/sddm sddm を使っているので、sddm の自動ログインを設定する。 OSは systemd で動いていると設定ファイルがないようなので作成する。 # sddm --example-config > /etc/sddm.conf.d/sddm.conf この設定ファイルに Autologin について書いてあるのでここにユーザ名を入力。 $ head /etc/sddm.conf.d/sddm.conf [Autologin] # Whether sddm should automatically log back into sessions when they exit Relogin=false # Name of session file for autologin session (if empty try last logged in) Session= # Username for autologin session User= ここの User= にユーザ名を書き込み保存後、再起動すると自動でログインされる。

TVに繋いでいた録画用HDDが認識しなくなった

ポロポロとものが壊れていく。 年数もそれなりに経っているので仕方がないと思うが、  Panasonic VIERA TH-L32X3  メーカーページ http://panasonic.jp/viera/p-db/TH-L32X3.html 上記VIERAに繋いでいた録画用のHDDが急に認識しなくなった。 実はこれで二回目のトラブルである。 一回目は買って1年ほどでこの症状が出た。 この時はHDDが物理的な障害で故障したと思い、ダメ元で再接続再フォーマットした。 このHDDはそのあと5年以上正常に動作していた。 結局この時の障害は論理障害だったのだと思う。 今回も同様の症状だったので、復旧を試みることにした。 こちらのサイトに Panasonic製のセットトップボックスへ繋いでいたHDDの修復について書いてあった。 Panasonic CATV STBの外付けHDDのファイルシステム修復 おぼえ書き http://qiita.com/a_saitoh/items/93a9983b988b541d2cb1 これを参考にして、FreeBSD11.0( https://www.freebsd.org/ja/ ) に外付けHDDを繋いで、fsck_ffs -n を実行するも復旧せず。 仕方がないので、fsck_ffs -y や fsck_ufs -n 、 fsck_ufs -y などをかけてからTVにつなぐと認識した。 録画データは諦めていたので、いろんなコマンドをかけてしまったので、 どのコマンドが良かったかはっきりとしないが、 無事にデータが参照できるようになった。