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 s lists your tmux sessions and lets you pick one

Tmux
~/tips/tip-tmux-choose-session

Ctrl-b s

Opens a list of all sessions to choose from, with a live preview of each.

Forgot what you called the session? Look at the list instead of guessing.

Ctrl-b s

A tree of sessions appears with a preview of the current window of the highlighted one. Move with the arrow keys and press Enter to switch. Press q or Escape to leave without changing anything.

Press Right on a session to expand it and see its windows, Left to fold it again. That makes it a smaller version of Ctrl-b w, which starts with every window of every session expanded.

The same list is available as tmux choose-tree -s, for example from a key binding or from the tmux command prompt.

Try it without risk: start a throwaway session with tmux new -s scratch, use the shortcut or command above there, look at what changes, and close it again with tmux kill-session -t scratch.

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