Skip to content

Latest commit

 

History

History
80 lines (78 loc) · 2.71 KB

tmux.md

File metadata and controls

80 lines (78 loc) · 2.71 KB

tmux

sudo apt install tmux

get into tmux without a given name

tmux

Structure

Session
|   Window
|   |   Pane

Manipulate tmux windows

  1. Hit [ Ctrl + B ] to wait for short-cut keys

  2. Then, press the short-cut keys to do what you want

    Pane

    Hot key Function
    % create a new pane horizontally
    " create a new pane vertically
    RIGHT
    LEFT
    UP
    DOWN
    switch between panes
    o switch pane
    x close the pane
    ! kill all other panes,
    keep the current only
    q show the number of panes

    Window pin

    Hot key Function
    c create a new window
    , rename the window
    w show the window
    NUM select the window
    p to the previous
    n to the next

    Session

    Hot key Function
    :new Session name create a new session
    with the given name
    $ rename current session
    s switch session
    d detach session
    (minimize, not kill)
    Ctrl+z hang on the session, return to bash

commands

  • activate mouse
    tmux set -g mouse on
  • view the running tmux sessions
    tmux ls
  • get back to the tmux session
    tmux attach -t ${SessionID}
    all the stuff would be preserved
    to QUIT but NOT KILL the session:
    Ctrl + B: Ctrl + Z
  • rename tmux session OUT IN HOST terminal
    tmux rename-session -t ${SessionID} ${SessionName}
  • create a new session OUT IN HOST terminal with a specified name:
    tmux new -s ${SessionName}
    without given name, the session can be reached through ID by default
    tmux
  • kill sessions that we don't use anymore
    tmux kill ${SessionID/SessionName}