「tmux」の版間の差分
提供: Eospedia
(ページの作成:「== tmux == * https://github.com/tmux/tmux == bash補完 == * https://github.com/imomaliev/tmux-bash-completion」) |
|||
| (同じ利用者による、間の6版が非表示) | |||
| 行1: | 行1: | ||
| − | |||
* https://github.com/tmux/tmux | * https://github.com/tmux/tmux | ||
| + | |||
== bash補完 == | == bash補完 == | ||
* https://github.com/imomaliev/tmux-bash-completion | * https://github.com/imomaliev/tmux-bash-completion | ||
| + | |||
| + | == セッション一覧の確認 == | ||
| + | $ tmux ls | ||
| + | |||
| + | == 新規セッションの開始 == | ||
| + | $ tmux new-session -s <セッション名> | ||
| + | sはsession-nameの意。tだったりsだったりわかりにくい。 | ||
| + | |||
| + | == デタッチしたセッションへのアタッチ == | ||
| + | $ tmux ls | ||
| + | でセッション一覧を表示。 | ||
| + | |||
| + | 0: 1 windows (created Thu May 16 12:58:12 2019) [169x55] | ||
| + | とか表示されたら、:の左の文字列がセッション名。デフォルトでは番号になってる。 | ||
| + | |||
| + | $ tmux attach-session -t <セッション名> | ||
| + | |||
| + | # attachはattach-sessionのエイリアス | ||
| + | $ tmux attach -t <セッション名> | ||
| + | tは"target session"の意。 | ||
| + | |||
| + | == セッション名の変更 == | ||
| + | $ tmux rename-session -t <現在のセッション名> <新しいセッション名> | ||
| + | |||
| + | == リモートでtmux == | ||
| + | リモートにsshしてからtmux使うと、tmuxでコピーしたテキストをローカルのクリップボードに持ってくることが出来なかったりして地味に困る。以下対処ログ。 | ||
| + | |||
| + | * [[ssh先のUbuntuのtmuxでコピーしたテキストをローカルのMacOSのクリップボードに転送する]] | ||
2019年8月26日 (月) 05:12時点における最新版
bash補完
セッション一覧の確認
$ tmux ls
新規セッションの開始
$ tmux new-session -s <セッション名>
sはsession-nameの意。tだったりsだったりわかりにくい。
デタッチしたセッションへのアタッチ
$ tmux ls
でセッション一覧を表示。
0: 1 windows (created Thu May 16 12:58:12 2019) [169x55]
とか表示されたら、:の左の文字列がセッション名。デフォルトでは番号になってる。
$ tmux attach-session -t <セッション名> # attachはattach-sessionのエイリアス $ tmux attach -t <セッション名>
tは"target session"の意。
セッション名の変更
$ tmux rename-session -t <現在のセッション名> <新しいセッション名>
リモートでtmux
リモートにsshしてからtmux使うと、tmuxでコピーしたテキストをローカルのクリップボードに持ってくることが出来なかったりして地味に困る。以下対処ログ。