# GNU Screen & tmux — the essentials + config (2025-03-04)

**URL:** <https://pluralist.net/t/gnu-screen-tmux-the-essentials-config-2025-03-04/259>\
**Category:** breadcrumbs\
**Created:** [March 4, 2025, 5:00am UTC](https://pluralist.net/t/gnu-screen-tmux-the-essentials-config-2025-03-04/259 "2025-03-04T05:00:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![delyan](https://pluralist.net/user_avatar/pluralist.net/delyan/32/245_2.png) [@delyan](https://pluralist.net/u/delyan)\
**Post date:** [March 4, 2025, 5:00am UTC](https://pluralist.net/t/gnu-screen-tmux-the-essentials-config-2025-03-04/259/1 "2025-03-04T05:00:00Z")

</div>

> **[Tmux - the essentials](https://davidwinter.dev/2019/03/14/tmux-the-essentials)**
>
> With only a handful of commands, tmux can still be your new best friend on the terminal

Here is a starter `~/.tmux.conf`:

```auto
# Enable mouse mode: scroll, resize, select panes with mouse
set -g mouse on
set -g history-limit 100000
setw -g mode-keys emacs

# --- Change prefix to Ctrl + ` ---
unbind C-b
set -g prefix `
bind ` send-prefix

# --- Disable internal clipboard forwarding ---
unbind -T copy-mode-vi y
bind -T copy-mode-vi y send -X copy-selection-and-cancel

# --- Smooth scrolling ---
set -g terminal-overrides 'xterm*:smcup@:rmcup@'
set -as terminal-features ',xterm-256color:RGB'

bind -n WheelUpPane if-shell -F "#{pane_in_mode}" "send-keys -M" "copy-mode -e; send-keys -M"
bind -n WheelDownPane if-shell -F "#{pane_in_mode}" "send-keys -M" "send-keys -M"

# --- Status bar appearance ---
set -g status-bg colour235
set -g status-fg white
set -g status-left ' #[fg=green]#(hostname | cut -d"." -f1) #[fg=yellow]|#[default]'
set -g status-right '#[fg=cyan]%Y-%m-%d #[fg=green]%H:%M #[default]'

```

* * *

# Historic Context

## Terminal Multiplexers — Command Prefix Summary

### GNU Screen

- **Default prefix:** `Ctrl-a`
- **Role:** Command leader for all Screen actions
- **Invocation pattern:** `Ctrl-a` → `<command>`

**Common commands:**

- `Ctrl-a c` — Create new window
- `Ctrl-a n` — Next window
- `Ctrl-a d` — Detach session

* * *

### tmux

- **Default prefix:** `Ctrl-b`
- **Role:** Command leader for all tmux actions
- **Invocation pattern:** `Ctrl-b` → `<command>`

**Common commands:**

- `Ctrl-b c` — Create new window
- `Ctrl-b n` — Next window
- `Ctrl-b d` — Detach session
- `Ctrl-b %` — Vertical split
- `Ctrl-b "` — Horizontal split

* * *

### In a nutshell

- **GNU Screen:** `Ctrl-a` (historic, canonical)
- **tmux:** `Ctrl-b` (chosen to avoid Screen conflict)
