Runtime files
The runtime directory is chosen in this order:
BMUX_RUNTIME_DIR, if set. Relative paths are resolved from the invoking directory.$XDG_RUNTIME_DIR/bmux, ifXDG_RUNTIME_DIRis set.- On macOS,
~/Library/Caches/bmux. - On Linux,
$XDG_CACHE_HOME/bmux, or~/.cache/bmuxif unset.
Use an absolute path for BMUX_RUNTIME_DIR so clients find the same server.
The directory must belong to your user, have mode 0700, and not be a symlink.
bmux creates it if missing. Changing the directory selects a separate server;
it does not move existing sessions.
| File | Purpose |
|---|---|
server.log |
Server output and startup errors |
server.pid |
Background server’s process ID |
server.sock |
Local client/server connection |
server.lock |
Prevents duplicate servers in this directory |
Persistent state
Section titled “Persistent state”Saved sessions (sessions.json), trusted .bmux.toml hashes (trusted-layouts.json),
and update-check state (update-check.json) live in a persistent state directory so
they survive runtime-cache cleanups:
BMUX_RUNTIME_DIR, if set (alongside the runtime files).- On macOS,
~/Library/Application Support/bmux/. - On Linux,
$XDG_STATE_HOME/bmux/, or~/.local/state/bmux/if unset.
Stop the server
Section titled “Stop the server”Use Ctrl-a d to detach and leave work running. To upgrade, use
bmux restart instead of stopping the server by hand; see
Restarts and reboots. A server stopped with SIGTERM
also saves its sessions first.
From a shell outside bmux, resolve the directory using the same environment you used to launch bmux:
Wait for server.pid to disappear before restarting. The next bmux command
starts a new server, which restores the saved sessions. The log remains
available for troubleshooting. To stop for good without restoring later, kill
the sessions first with bmux kill NAME.
Uninstall
Section titled “Uninstall”Stop the server first using the instructions above. Removing the executable alone does not stop running sessions.
For a Go installation, remove the installed binary:
If you moved the binary or built from source, remove that executable instead;
command -v bmux locates the one on your PATH. After shutdown, you can remove
the runtime directory, persistent state files (sessions.json,
trusted-layouts.json, update-check.json), and ~/.config/bmux. Remove any
BMUX_* settings you added to your shell configuration.