tmux.rst
author Oleksandr Gavenko <gavenkoa@gmail.com>
Sun, 03 Jan 2021 23:37:00 +0200
changeset 2492 bd3d45148652
parent 2437 d5f98b5fdcb8
permissions -rw-r--r--
Fixed example.


======
 tmux
======

Basic workflow
==============

``tmux`` default prefix is ``Ctrl+B``. Start tmux by::

  $ tmux
  $ tmux new -s NAME

Basic commands::

* ``Ctrl+b c`` create a new window
* ``Ctrl+b 0`` switch to window 0
* ``Ctrl+b 1`` switch to window 1
* ``Ctrl+b 2`` switch to window 2 / etc
* ``Ctrl+b x`` kill current window
* ``Ctrl+b ,`` rename pane
* ``Ctrl+b d`` detach tmux
* ``Ctrl+b "`` split a pane horizontally
* ``Ctrl+b %`` split pane vertically
* ``ctrl+b <arrow>`` move around panes
* ``ctrl+b :`` resize pane

List all tmux sessions::

  $ tmux ls
  $ tmux list-sessions

To attack to specific session::

  $ tmux a -t NAME

Getting help
============

Dump key binding::

  $ tmux list-keys

Dump available commands::

  $ tmux list-commands

List everything::

  $ tmux info

Navigating terminal screen
==========================

Use sequence ``Ctrl+b [`` to enter to copy mode.

Copy mode allows navigation through tmux terminal screen by arrow keys and copy/paste

Press ``Ctrl-c`` to leave copy mode.