Operations 4 min read

Master tmux on Linux: Create, Manage, and Navigate Sessions Efficiently

This guide explains how to install tmux on CentOS, create and name sessions, detach and reattach them, list existing sessions, and use keyboard shortcuts to open, switch, split, and close windows, providing practical commands and visual examples for seamless terminal multiplexing.

Liangxu Linux
Liangxu Linux
Liangxu Linux
Master tmux on Linux: Create, Manage, and Navigate Sessions Efficiently

tmux is a terminal multiplexer similar to Screen that keeps programs running when a terminal disconnects and allows a single terminal window to host multiple sessions, greatly simplifying multitasking.

On Ubuntu tmux is pre‑installed, but on CentOS you need to install it manually: # yum install tmux -y To start a new session named test: tmux new-session -s test Exit a session with the exit command or Ctrl +D . The session continues running in the background.

When the window closes or the network drops, reattach the session with: tmux attach-session -t test List all active sessions using: tmux ls Inside a session you can create additional windows. Press Ctrl +B then C to open a new window. The status line at the bottom shows the window numbers (e.g., 0, 1, 2).

Switch to a specific window by pressing Ctrl +B followed by the window number (e.g., 0 ).

Close the current window by pressing Ctrl +B , then X , and confirming with Y .

For side‑by‑side comparison, split the current window horizontally with Ctrl +B then % (Shift + 5). This creates a new pane independent of other windows.

Horizontal split example
Horizontal split example

Split vertically with Ctrl +B then " (Shift + comma). This creates a new vertical pane.

Vertical split example
Vertical split example

Navigate between panes: Ctrl +B then O cycles through panes from top‑to‑bottom and left‑to‑right; Ctrl +B then ; toggles between the current and previous pane.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Linuxcommand-lineSession Managementterminaltmuxsystem operations
Liangxu Linux
Written by

Liangxu Linux

Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.