Tmux

Introduction

This document contains frequently used command and the corresponding used cases for terminal multiplexer tmux. For simplification, all the variables are written in parenthesis, e.g. (name).

 

Table of Content

 

Installation

Back to Top

Install tmux on Mac

brew install tmux

Install tmux on Linux (RHEL)

sudo yum install tmux

Install tmux on Linux (Debian)

sudo apt install tmux

 

Session Operations

Back to Top

Start tmux session

tmux

Start tmux session with custom session name

tmux new -s (name)

Detach tmux session

Ctrl+b, d

Show all tmux sessions

tmux ls

Attach tmux session in the background

tmux attach-session -t (name)

Kill tmux session

tmux kill-session -t (name)

 

Window Operations

Back to Top

Create new window

Ctrl+b, c

Kill window

Ctrl+b, &

Select the window to switch to

Ctrl+b, w

Switch to specific window

Ctrl+b, (number)

 

Pane operations

Back to Top

Create vertical split

Ctrl+b, "

Create horizontal split

Ctrl+b, %

Close pane

Ctrl+b, x

Switch to specific pane

Ctrl+b, (arrow button)

Switch to next pane

Ctrl+b, o

Switch to next layout

Ctrl+b, (space)

 

Miscellaneous

Back to Top

Enable scrolling

Ctrl+b, [

Quit scrolling

q

Related articles

Introduction to Linux

An operating system sits between users and hardware. It manages memory, processes, files, and devices while exposing a graphical or command-line interface. - Linux - iOS - Android - macOS - Windows…

Training

Poetry

This file defines project metadata and dependencies. This file pins the exact dependency versions used in the project for reproducibility. --- --- Poetry is ideal for clean, reproducible Python pro…

Training

Python

In Python, values such as integers, strings, lists, and functions are all objects. They have types and methods, which is different from C++ primitive values. --- Lists are ordered, mutable sequence…

Training

Git

Git is a distributed version control system (DVCS) used to: - track changes to files over time - collaborate with multiple people on the same project - manage branches independently - sync code wit…

Training