Linux command
shpool 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Attach to a named session
shpool attach [session_name]
List all active sessions
shpool list
Detach from the current session
shpool detach
Kill a named session
shpool kill [session_name]
Start the daemon
shpool daemon
Attach with a session timeout
shpool attach --ttl [2h] [session_name]
说明
shpool is a lightweight shell session persistence tool. It allows named shell sessions to survive disconnections and be reattached later, similar to tmux or screen, but without terminal multiplexing features like window splitting or tiling. Shpool preserves native terminal behavior including scrollback and copy-paste by sending raw shell output directly to the local terminal emulator. It maintains an in-memory terminal state using VT100 emulation, allowing it to redraw the screen upon reattachment so users can see output generated while disconnected. The daemon auto-detects bash, zsh, and fish shells, injecting a prompt prefix showing the session name for easy identification. Each session supports a single client at a time.
参数
- -f
- Force-attach to a session, detaching any existing client first. Used with attach.
- --ttl _duration_
- Set a session timeout. The session is automatically killed after this duration. Used with attach.
- -d
- Enable autodaemonization (default behavior).
- -D
- Disable autodaemonization; run daemon in the foreground.
FAQ
What is the shpool command used for?
shpool is a lightweight shell session persistence tool. It allows named shell sessions to survive disconnections and be reattached later, similar to tmux or screen, but without terminal multiplexing features like window splitting or tiling. Shpool preserves native terminal behavior including scrollback and copy-paste by sending raw shell output directly to the local terminal emulator. It maintains an in-memory terminal state using VT100 emulation, allowing it to redraw the screen upon reattachment so users can see output generated while disconnected. The daemon auto-detects bash, zsh, and fish shells, injecting a prompt prefix showing the session name for easy identification. Each session supports a single client at a time.
How do I run a basic shpool example?
Run `shpool attach [session_name]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -f do in shpool?
Force-attach to a session, detaching any existing client first. Used with attach.