Jun's Blog

Output, activities, memo and etc.

Install tmux

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

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!

Reference