brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: Ctrl-b and a digit jumps straight to that tmux window

Tmux
~/tips/tip-tmux-select-window-number

Ctrl-b 0

Switches to a window by its number, shown in the status bar, with two key presses.

When you know which window you want, skip the browsing. The number in the status bar is the shortcut.

Ctrl-b 0
Ctrl-b 1
...
Ctrl-b 9

Each digit selects the window with that number. By default numbering starts at 0, which is why many people set base-index to 1, so the first window sits on the 1 key.

Windows with a number above 9 cannot be reached this way. For those use Ctrl-b ', which asks for the window index, or Ctrl-b w to pick from a list.

Combined with Ctrl-b , to name windows, you end up with a session where each window has a name and a fixed number, and you jump around without thinking about it.

Try it safely: start a throwaway session with tmux new -s scratch, run it there, and close the session again with tmux kill-session -t scratch. Nothing else is touched.

Further reading: tmux manual page (OpenBSD, official), tmux wiki: Getting Started (official)

More Tmux tips tmux new -d -s report -x 200 -y 50 'top' tmux wait-for build-done set -g allow-passthrough on tmux kill-server Ctrl-b [ All Tmux tips (125) All topics

Link