Understanding Windows
In tmux, a window is a single screen within a session. Each window occupies the entire terminal and can contain one or more panes. Windows are the primary organizational unit for grouping related tasks.Think of windows like tabs in a web browser - they’re separate workspaces within the same session.
Creating Windows
Basic Window Creation
The simplest way to create a window is with thec key:
Creating Named Windows
Giving windows descriptive names makes navigation easier:- Key Binding
- Command Line
- Command Prompt
After creating a window with
C-b c, rename it with C-b ,Creating Windows with Commands
Start a window running a specific command:Window Creation Options
Window Selection and Navigation
Quick Selection
The fastest way to switch windows:Interactive Selection
Programmatic Selection
Window Naming
Manual Naming
Rename the current window:Automatic Naming
By default, tmux automatically renames windows based on the active command. Control this with options:Setting Names via Escape Sequences
Programs can set the window name:Moving and Reordering Windows
Moving Windows Between Indexes
- Interactive
- Command
Press
C-b . then type the destination index:Swapping Windows
Exchange two windows:Renumbering Windows
Renumber all windows sequentially:Renumbering respects the
base-index option. If base-index is 1, windows will be numbered 1, 2, 3, etc.Linking Windows
Windows can be linked to multiple sessions, allowing them to appear in more than one place.Creating Links
Session Groups
Create sessions that share windows:Unlinking Windows
Killing Windows
Interactive Kill
Command Line Kill
Window Information
Listing Windows
Displaying Window Info
Window Formats
Useful format variables for windows:Window Options
Configure window behavior with options:Common Window Options
Automatic Naming
Automatic Naming
Window Size
Window Size
Activity Monitoring
Activity Monitoring
Mode Keys
Mode Keys