Install and use tmux which is multi window tool in the terminal.
Tmux official page: tmux
Environment: Host OS: Mac, Guest OS: Fedora23
Install tmux
Check the list of current installed dnf packages.
tmux is not installed.
$ dnf list installed | grep tmux
Install tmux with DNF.
DNF is the next upcoming major version of Yum. See man dnf for detail.
$ sudo dnf install tmux
tmux is installed.
$ dnf list installed | grep tmux
tmux.x86_64 2.0-2.fc23 @fedora
Usage
Manual
$ man tmux
or
http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man1/tmux.1?query=tmux&sec=1
To start
$ tmux
Commands
Pane: Panel. Sub window in one window. Ctrl + b, + " : Split the current pane into two, top and bottom. % : Split the current pane into two, left and right. o : Select the next pane in the current window. ; : Move to the previously active pane. q : Briefly display pane indexes. x : Kill the current pane. Up, Down, Left, Right : Change to the pane above, below, to the left, or to the right of the current pane. c : Create a new window. n : Change to the next window. p : Change to the previous window. & : Kill the current window. w : Show the list of window. Can select with arrow key, and type enter key to show the window. [ : Enter copy mode to copy text or view the history. Use arrow and page up/down key to scroll the page. Type q for quit.
Copy mode
- Ctrl + b, [ : Enter into copy mode.
- Space : Set start point to copy.
- Enter : Set end point to copy.
- Ctrl + b, ] : Paste buffered text.
It is useful to scroll the window!
Customize rc file.
See below file.
https://github.com/junaruga/my-config-pub/blob/master/home/.tmux.conf
Reference
- How to use tmux on Mac [Japanese]: tmuxの使い方 - Qiita
- How to use tmux. About .tmux.conf [Japanese]: GNU Screen ライクなターミナルマルチプレクサ「tmux」を使う - えこ日記
- Copy mode and etc. [Japanese]: tmux基本のコマンド — nato's memo 1.0 documentation