Documentation
KERSIST is a Linux command-line utility for creating tmux sessions that persist across reboots, recover from crashes, and follow an explicit lifecycle.
What is KERSIST?
KERSIST = Kerkar Persistent Sessions. It makes chosen tmux sessions persistent by managing them with the system's own systemd. It does not replace tmux, and it does not add a kernel module, agent daemon that stays inside your session, or a custom service manager.
Supported systems
- Linux with systemd as PID 1
- amd64 and arm64
- Tested releases: Ubuntu 24.04, Ubuntu 26.04, Debian 12
- tmux 3.0+, Python 3.9+ (installed automatically as a dependency)
Command summary
| Command | What it does |
|---|---|
create NAME | Create a new persistent session in the current directory and attach. |
attach NAME | Adopt an existing tmux session; make it persistent without touching it. |
ls | List KERSIST sessions (and ordinary tmux sessions). |
start NAME | Start or recreate a session from its saved configuration. |
stop NAME | Stop a session but keep its configuration; it stays stopped after reboot. |
restart NAME | Stop and recreate from the saved configuration. |
drop NAME | Stop managing a session; the tmux session keeps running. |
status NAME | Show the live lifecycle state of one managed session. |
exec NAME COMMAND... | Run a command inside a managed session without attaching. |
See the full command reference.
Lifecycle semantics
- Accidental exit is permanent. Typing
exitin the last pane, or runningtmux kill-session, deletes the session and its KERSIST configuration. - Intentional stop persists.
kersist stop NAMEsurvives a reboot — the session comes back only withkersist start. - Unexpected failure recovers. A tmux crash, killed server, or machine reboot is recovered from the saved configuration and commands.
Installation
$ curl -fsSL https://apt.kersist.kerkars.com/install | sudo bash
Then:
$ sudo apt install kersist
$ kersist --versionSee Installation for details and repository information.