Skip to main content

How to Install and Use tmux on Linux: A Beginner's Guide

HardReset.InfoJanuary 1, 20269 min30 views
1 connections·2 entities in this video→

Introduction to tmux

  • πŸ’‘ tmux is a terminal multiplexer that allows you to run multiple terminal sessions within a single window.
  • 🎯 This is achieved by splitting the screen into panes, enabling concurrent command execution and background task management.

Installing tmux

  • πŸ’» To install tmux on Linux, open your terminal and execute the command sudo apt install tmux.
  • πŸ”‘ You will be prompted to enter your password and confirm the installation by typing 'yes'.

Basic tmux Usage

  • πŸš€ Start a tmux session by typing tmux in the terminal.
  • πŸ“Š The status bar at the bottom indicates the current window number (starting from 0).
  • πŸ”‘ The prefix key is Ctrl + B. This must be pressed before most tmux commands.

Managing Windows and Panes

  • βž• Create a new window by pressing Ctrl + B followed by C.
  • πŸͺŸ List all windows with Ctrl + B then W, and switch between them using arrow keys or by number (Ctrl + B + window number).
  • πŸ”€ Split the current pane vertically using Ctrl + B and % (Shift + 5).
  • ↔️ Split the current pane horizontally using Ctrl + B and the sign next to Enter.
  • β¬†οΈβ¬‡οΈβ†”οΈβž‘οΈ Navigate between split panes using Ctrl + B followed by the arrow keys.

Sessions: Detaching, Attaching, and Naming

  • πŸ“€ Detach from a running tmux session by pressing Ctrl + B then D.
  • πŸ“„ List all active sessions with tmux ls.
  • πŸ”— Reattach to a session using tmux attach -t <session_name_or_number>.
  • 🏷️ Create a named session for easier management with tmux new -s <session_name>.
  • πŸš€ Reattaching to a named session is done via tmux attach -t <session_name>.
Knowledge graph2 entities Β· 1 connections

How they connect

An interactive map of every person, idea, and reference from this conversation. Hover to trace connections, click to explore.

Hover Β· drag to explore
2 entities
Chapters4 moments

Key Moments

Transcript33 segments

Full Transcript

Topics11 themes

What’s Discussed

tmuxLinuxTerminal MultiplexerInstall tmuxtmux commandstmux sessionstmux windowstmux panesnamed sessionsdetach sessionattach session
Smart Objects2 Β· 1 links
ProductsΒ· 2