If you spend any time in a terminal on Parrot Linux, tmux is one of the first tools worth learning. A Parrot Linux tmux setup lets you keep several shells open inside a single terminal window, split that window into panes, and detach from a session so your long-running scans, builds or SSH connections keep going even after you close the terminal or lose your connection. This guide walks you through installing tmux, the handful of keybindings that matter, and a configuration that makes it feel at home on Parrot OS.
What tmux actually does
tmux stands for “terminal multiplexer”. Think of it as a window manager that lives inside your terminal. It has three layers:
- Sessions – a workspace that survives independently of the terminal emulator you opened it from. You can detach from a session and reattach later, from the same machine or over SSH.
- Windows – tabs inside a session. Each window is a full-screen view.
- Panes – splits inside a window, so you can watch a log in one half and type commands in the other.
For Parrot users the detach feature is the big win. Start an nmap scan against your lab target, a hashcat job or a long parrot-upgrade, detach, close the laptop lid, and the job is still running when you come back. If you work on remote boxes, pair it with the setup in our Parrot Linux SSH server guide and a dropped connection no longer kills your shell.
Install tmux on Parrot Linux
tmux is in the standard Parrot repositories, which are built on Debian. On many Parrot images it is already present, so check first:
tmux -VIf that prints a version number you are done. If you get “command not found”, install it with apt:
sudo apt update
sudo apt install tmuxBecause Parrot 7.x tracks Debian 13, the version you get is whatever Debian ships for that release. You do not need a third-party repository or a snap; the apt package is kept current with security fixes through normal parrot-upgrade runs. If you want the newest upstream release for a specific feature, the source and release notes live on the tmux project page, but for day-to-day use the packaged version is the better choice.
Your first session
Open a terminal and start a named session. Naming sessions is a habit worth building from day one, because unnamed sessions are just numbered and quickly become confusing:
tmux new -s labYou are now inside tmux. The green bar at the bottom is the status line; it shows the session name on the left and the current window list in the middle. Run a command, then detach with Ctrl+b followed by d. You are back at your normal shell, but the session is still alive. Confirm with:
tmux lsReattach to it with:
tmux attach -t labIf you only have one session, plain tmux a works too. To end a session for good, type exit in every shell inside it, or kill it from outside with tmux kill-session -t lab.
The prefix key and the keybindings you need
Every tmux shortcut starts with the prefix, which is Ctrl+b by default. Press the prefix, release it, then press the command key. Here are the ones you will use constantly:
| Keys (after Ctrl+b) | Action |
|---|---|
d | Detach from the session |
c | Create a new window |
n / p | Next / previous window |
0–9 | Jump to window by number |
, | Rename the current window |
% | Split the pane vertically (side by side) |
" | Split the pane horizontally (top and bottom) |
| Arrow keys | Move between panes |
z | Zoom the current pane to full screen (press again to restore) |
x | Close the current pane (asks for confirmation) |
[ | Enter copy/scroll mode; q to leave |
? | List every keybinding |
The scroll mode deserves a word. By default your mouse wheel does nothing inside tmux. Press Ctrl+b then [, scroll with the arrow keys or Page Up, and press q to return. We will turn on mouse support in the config below, which most people prefer. If you already use the shortcuts from our Parrot Linux keyboard shortcuts guide, note that tmux bindings only fire after the prefix, so they will not clash with your desktop or terminal shortcuts.
A practical tmux config for Parrot OS
tmux reads ~/.tmux.conf at startup. The defaults are usable but a few changes make a real difference. Create the file with your editor of choice:
nano ~/.tmux.confPaste this in:
# Use Ctrl+a as the prefix (easier to reach than Ctrl+b)
unbind C-b
set -g prefix C-a
bind C-a send-prefix
# Mouse support: click panes, drag to resize, scroll with the wheel
set -g mouse on
# Start numbering windows and panes at 1 instead of 0
set -g base-index 1
setw -g pane-base-index 1
# Keep more scrollback for long scan output
set -g history-limit 50000
# Easier split keys that keep the current directory
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
# Reload the config without restarting tmux
bind r source-file ~/.tmux.conf ; display "Config reloaded"
# Proper colours for Parrot's terminal
set -g default-terminal "tmux-256color"
set -ag terminal-overrides ",xterm-256color:RGB"
# Vi-style keys in copy mode
setw -g mode-keys viSave the file. If tmux is already running, press your prefix then r to reload it, or run tmux source-file ~/.tmux.conf from any pane. A few notes on these choices:
- Changing the prefix to Ctrl+a is a common swap because it is easier to hit with one hand. If you rely on Ctrl+a for “go to start of line” in your shell, press the prefix twice to send it through.
- The
history-limitsetting matters on Parrot. Tools such asnmap -A,gobusterorniktoproduce thousands of lines, and the default buffer is small. - The
-c "#{pane_current_path}"part opens new splits in the directory you are already in, which saves a lot ofcdtyping when you are inside a project folder.
Copying text out of tmux
With mode-keys vi enabled, enter copy mode with the prefix and [, move the cursor to where you want to start, press Space to begin a selection, move to the end and press Enter to copy. Paste anywhere in tmux with the prefix and ]. That copies into tmux’s own buffer, not the system clipboard.
To push selections to the desktop clipboard on a Parrot KDE Plasma, MATE or LXQt desktop, install a clipboard helper and bind it. On Wayland sessions use wl-clipboard; on X11 use xclip. You can check which one you are running with echo $XDG_SESSION_TYPE.
# X11
sudo apt install xclip
# then add to ~/.tmux.conf:
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xclip -selection clipboard -i"
# Wayland
sudo apt install wl-clipboard
# then add to ~/.tmux.conf:
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "wl-copy"Now y in copy mode behaves like “yank to clipboard”, and you can paste into Firefox, your notes app or a Burp Suite field with the usual Ctrl+v.
Workflows that make sense on Parrot
A lab session layout
A layout that works well for home-lab work and CTF practice: one window named recon split into two panes (scan on the left, notes on the right), a second window named web for Burp or ZAP output and a third named shell for whatever shell you catch. You can script it so the whole thing comes up with one command:
#!/bin/bash
# ~/bin/labsession
tmux new-session -d -s lab -n recon
tmux split-window -h -t lab:recon
tmux new-window -t lab -n web
tmux new-window -t lab -n shell
tmux select-window -t lab:recon
tmux attach -t labMake it executable with chmod +x ~/bin/labsession. This pairs nicely with the machine setup described in our Parrot Linux CTF setup guide.
Keeping remote jobs alive
When you SSH into a Parrot Cloud Edition VPS or any other box, start tmux first thing. If your Wi-Fi drops mid-task, reconnect and run tmux a; everything is exactly as you left it. To make this automatic, add to the remote machine’s ~/.bashrc or ~/.zshrc:
if [ -z "$TMUX" ] && [ -n "$SSH_CONNECTION" ]; then
tmux attach -t main 2>/dev/null || tmux new -s main
fiEvery SSH login then lands you in a session called main, creating it if needed.
Logging a pane to a file
For documenting your own testing, pipe a pane’s output to a file. Inside the pane you want to record, run:
tmux pipe-pane -o "cat >> ~/logs/recon-$(date +%F).log"Run the same command again to stop. Create ~/logs first. This captures everything printed to that pane, which is handy for writing up lab results later.
Common problems and fixes
- Colours look wrong or vim renders oddly. Make sure the
default-terminalandterminal-overrideslines from the config above are present, then fully quit tmux (tmux kill-server) and start it again. Config changes to terminal settings do not apply to already-running sessions. - “sessions should be nested with care” appears when you run
tmuxinside an existing tmux pane, usually over SSH. Either detach first, or deliberately use a different prefix on the remote side. - Mouse selection does not copy. With
mouse on, dragging selects inside tmux rather than your terminal. Hold Shift while dragging to get the terminal emulator’s native selection back. - Keys like Home/End misbehave in zsh. This is a terminfo mismatch. Setting
default-terminaltotmux-256colorusually fixes it; if the terminfo entry is missing on an older remote host, fall back toscreen-256color. - You lost track of sessions.
tmux lslists them; the prefix followed by s gives an interactive chooser, and w does the same for windows across all sessions.
tmux or screen?
GNU screen is also packaged for Parrot and does the same basic job. tmux wins on configuration (one readable file), scripting (every action is a shell command), and pane handling. The only common reason to prefer screen is muscle memory from older servers. If you are starting fresh on Parrot OS, pick tmux. Developers setting up a workstation with the stack from our Parrot Linux programming setup guide will also find that most editor integrations target tmux rather than screen.
FAQ
Does tmux come pre-installed on Parrot Linux?
It depends on the edition and image. Run tmux -V; if it prints a version, it is installed. Otherwise sudo apt install tmux adds it in seconds from the standard repositories.
Will my tmux session survive a reboot?
No. Sessions live in memory and end when the machine shuts down. They do survive closing the terminal, logging out of SSH and, on a desktop, locking the screen. For persistence across reboots, look at the tmux-resurrect plugin, which saves and restores layouts.
Can I use the same config on the Parrot MATE, KDE and LXQt spins?
Yes. tmux runs inside the terminal and does not care which desktop you use. The only desktop-specific part is the clipboard helper: use wl-copy on Wayland sessions and xclip on X11.