# tmux Cheat Sheet: Sessions, Windows and Split Panes

> A tmux cheat sheet with the default keys for sessions, windows, split panes, copy mode and config, plus how the same pane habits work in Monok on a Mac.

Canonical: https://monok.io/blog/tmux-cheat-sheet.md

[Terminal](https://monok.io/blog/category/terminal)

Nemo · October 27, 2026 · 5 min read

Every tmux shortcut starts with the prefix, Ctrl+b by default: press it, let go, then press the command key. Ctrl+b then % splits the pane left and right, Ctrl+b then “ splits it top and bottom, Ctrl+b then an arrow moves between panes, and Ctrl+b then d detaches the session so it keeps running after you close the terminal. The tables below cover the keys you use every day, all with tmux’s default bindings.

## Why keep a tmux cheat sheet?

tmux has a lot of keys, and you’ll use about ten of them daily. The rest you look up, usually in the middle of something: a server is running in one pane, logs in another, and you can’t remember how to zoom. A short sheet you trust is faster than a man page, because the man page lists every option and you need one key. In the tables, “prefix” means Ctrl+b.

## Which commands manage sessions?

A session is a set of windows that lives on after you detach.

| Action | Command or keys |
|---|---|
| New named session | `tmux new -s work` |
| List sessions | `tmux ls` |
| Attach to a session | `tmux attach -t work` (or `tmux a`) |
| Detach | prefix, then d |
| Pick a session from a list | prefix, then s |
| Rename the session | prefix, then $ |
| Kill a session | `tmux kill-session -t work` |

## Which keys manage windows?

A window is a full screen inside a session, like a tab.

| Action | Keys |
|---|---|
| New window | prefix, then c |
| Rename window | prefix, then , |
| Next / previous window | prefix, then n / p |
| Go to window 0 to 9 | prefix, then the number |
| Choose from a list | prefix, then w |
| Close window | prefix, then & |

## How do you split and move between panes?

Panes are the reason to install tmux: the server, the logs and an editor stay in view at once, so you never swap windows to check one.

| Action | Keys |
|---|---|
| Split left and right | prefix, then % |
| Split top and bottom | prefix, then “ |
| Move to a pane | prefix, then an arrow key |
| Next pane | prefix, then o |
| Zoom a pane (and back) | prefix, then z |
| Swap with previous / next | prefix, then { / } |
| Cycle layouts | prefix, then Space |
| Show pane numbers | prefix, then q |
| Turn a pane into a window | prefix, then ! |
| Resize | prefix, then Ctrl+arrow |
| Close the pane | prefix, then x |

## How do you scroll and copy?

Press prefix, then [ to enter copy mode. Scroll with the arrow keys or Page Up and Page Down, and press q to leave. Prefix, then ] pastes the last buffer. With `set -g mouse on` in your config, the trackpad scrolls and selects too.

Two more keys worth remembering: prefix, then ? lists every binding, and prefix, then : opens the command prompt.

## What goes in a basic .tmux.conf?

The config lives in `~/.tmux.conf`. A small start:

```
set -g mouse on
set -g base-index 1
set -g prefix C-a
unbind C-b
bind C-a send-prefix
```

That turns on the mouse, numbers windows from 1 (so the first window sits on the 1 key, at the left of the number row) and moves the prefix to Ctrl+a, which is easier to reach than Ctrl+b. Reload it inside tmux with prefix, then `:source-file ~/.tmux.conf`. On a Mac, install tmux with Homebrew: `brew install tmux`.

## Can you get tmux-style panes without tmux?

For terminals inside a browser window, yes. Monok is a Mac browser where every tab is a tree of panes, and a pane can be a web page or a [native terminal](https://monok.io/blog/browser-with-built-in-terminal) running your login shell. The keys are Mac shortcuts, with no prefix:

| tmux | Monok |
|---|---|
| prefix, then % | Cmd+D splits right |
| prefix, then “ | Shift+Cmd+D splits down |
| prefix, then arrow | Option+Cmd+arrow moves the focus |
| prefix, then { or } | Option+Shift+Cmd+arrow swaps panes |
| prefix, then z | Shift+Cmd+Return zooms a pane |
| prefix, then x | Cmd+W closes the pane |

Option+Cmd+= evens the panes out, and Ctrl+` splits a terminal in under the page. Pane layouts come back with the session, but a shell doesn’t: a terminal comes back as an empty pane. Save Tab As… (right-click a tab) keeps a layout as a favorite, with each terminal’s folder, and opening it starts those terminals in their folders without running a command. That is the honest difference: Monok panes don’t detach and don’t run on a remote server. For that, keep using tmux, inside a Monok terminal pane if you like.

The rest of the browser follows the same keyboard-first idea; the [Mac browser shortcuts guide](https://monok.io/blog/keyboard-shortcuts-mac-browser) covers the keys that work everywhere, and the [Safari ad blocker guide](https://monok.io/blog/safari-ad-blocker) explains the blocking built into Monok. The [home page](https://monok.io/) has the full tour.

**Try it:** [download Monok for Mac](https://monok.io/download), free while in preview, macOS 14 or later.

## FAQ

### What is the tmux prefix key?

Ctrl+b by default. Press it, release it, then press the command key. Many people move it to Ctrl+a in `~/.tmux.conf`.

### How do I split a pane vertically in tmux?

Prefix, then % puts two panes side by side. Prefix, then “ stacks them top and bottom.

### How do I exit tmux without killing my session?

Detach with prefix, then d. `tmux attach` brings it back.

### Does Monok replace tmux?

Not for remote servers or detached sessions. It gives you tmux-style panes for pages and local terminals in one Mac window. Get it on the [download page](https://monok.io/download).

Early preview · macOS

Monok is a small Mac browser with a native terminal and a file manager.

Magic Bar, tmux-style panes, your own shell and ad blocking built in. Free while in preview.

 [Go to the download](https://monok.io/download)

**About this article.** Written by Nemo, who is building Monok. Performance numbers here are v1 targets unless a post says they were measured, and on what. Spotted something wrong or out of date? [Tell us](mailto:support@monok.io).

More in Terminal

[Files](https://monok.io/blog/category/files) Oct 28, 2026 · 4 min

## [How to Show Hidden Files on Mac: Finder and Terminal](https://monok.io/blog/show-hidden-files-mac)

How to show hidden files on a Mac: the Finder shortcut Cmd+Shift+Period, the Terminal command that keeps them visible, and how to reach the Library folder.

[Web Platform](https://monok.io/blog/category/web-platform) Oct 27, 2026 · 4 min

## [The Web APIs React and Angular Apps Need From a Browser](https://monok.io/blog/web-apis-react-angular-need)

Which Web APIs React and Angular apps need from a browser: the DOM, events, microtasks, timers, fetch, history and observers, the bar a new engine must clear.

[Guides](https://monok.io/blog/category/guides) Oct 27, 2026 · 4 min

## [Safari Ad Blocker: How Content Blockers Work on a Mac](https://monok.io/blog/safari-ad-blocker)

How a Safari ad blocker works on a Mac: content blockers from the App Store, the privacy settings to turn on, and a WebKit browser with blocking built in.
