Whetstone.
SessionsThe session manager and resurrection
Module 6 · Lesson 212 min

The session manager and resurrection

The session manager is a built-in plugin that gives you a visual switcher: browse active sessions, resurrect dead ones, start new ones, rename the current one, and kill sessions, all from one floating panel. It’s the fastest way to move between sessions once you have more than one.

Session mode plugins
CtrlthenoEnter Session mode
wOpen the session manager (floating)
cOpen the configuration plugin
pOpen the plugin manager
aOpen the about plugin

Resurrection is why a Zellij session feels immortal. About once a second, Zellij serialises each session, its tabs, panes, and the command running in each pane, to a layout file in your cache folder. If the session exits (a clean quit, a crash, a reboot), that layout is kept. zellij ls shows exited sessions as resurrectable, and attaching to one rebuilds it and re-runs the commands.

Practice

Try it yourself

Do

Switch with the session manager

Use the visual switcher to move between sessions.

  • Make sure you have at least two sessions (start a second: detach, then zellij --session scratch)
  • Press Ctrl o then w to open the session manager
  • Select another session and switch to it
  • Open it again and try renaming the current session from the panel
Done whenThe session manager appeared as a floating panel and let you switch to another session.
Do

Resurrect a dead session

Kill a session and bring it back to prove resurrection works.

  • In a throwaway session, run a long-lived command in a pane, like top
  • Detach, then kill it: zellij kill-session <name>
  • Run zellij ls and find it listed as exited/resurrectable
  • Run zellij attach <name> and watch the layout and command come back
Done whenThe killed session reappeared in zellij ls and reattaching rebuilt its panes and re-ran the command.
Sign in to track your progress →