SessionsDetach, list, attach
No narration yet
Module 6 · Lesson 111 min

Detach, list, attach

The session is the outermost container and the reason to use Zellij at all. Detaching leaves the session running in the background and drops you back to your shell. Quitting tears it down. The difference is the whole point: detach is how work survives, quit is how it ends.

Detach (Session mode)
CtrlthenoEnter Session mode
dDetach from the session (leaves it running)

From your shell, three commands run the session lifecycle: list what's running, attach to one, and kill one you're done with. Name your sessions when you start them and this all gets easier; a random name is fine for a scratch session but useless when you have three going.

Session lifecycle from the shell
zellij ls                    # list running (and resurrectable) sessions
zellij attach whetstone    # reattach by name (short: zellij a)
zellij kill-session whetstone   # kill one session (short: zellij k)
zellij kill-all-sessions     # prompt to kill them all (short: zellij ka)
Practice

Try it yourself

Do

Detach and reattach

The core session loop, end to end.

Tick every step to confirm you did it.

Quiz

Keep it alive

Which action leaves your session running in the background?