Scripted detached session
Spawn background session and inject a command; survives SSH disconnect
tmux new-session -d -s work && tmux send-keys -t work 'tail -f /var/log/app.log' Enter
- tool
- tmux17 commands
More tmux commands
-
tmux capture-pane -p -S -3000 -t work > /tmp/pane.logDump last 3000 lines of a pane to a file for triage without attaching
-
tmux new-session -s workStart a new tmux session named 'work'
-
tmux attach-session -t workAttach to an existing named session
-
tmux lsShow all active tmux sessions
-
<prefix> dDetach from current session leaving it running in background