Send command to all panes
Run a command in every pane of the current session
tmux list-panes -s -F '#{session_name}:#{window_index}.#{pane_index}' | xargs -I{} tmux send-keys -t {} 'uptime' Enter
More tmux commands
-
tmux new-session -d -s work && tmux send-keys -t work 'tail -f /var/log/app.log' EnterSpawn background session and inject a command; survives SSH disconnect
-
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