Open a new tmux session with 2 extra windows all named (-n) and start an application in each:
tmux new-session -n ssh \; \ send-keys 'ssh root@10.10.10.10' C-m \; \ new-window -n profile \; \ send-keys 'vi .profile' C-m \; \ new-window -n etc \; \ send-keys 'ls -l /etc' C-m \; \ attach
Sources:
Store the below in your ~/.tmux.conf:
# Override the default-client-command to 'attach' so it attaches to the session we are about to start (instead of a session after that). # default-client-command does not exist in all tmux version. It works on OpenBSD, but not on Devuan 6.0.0 set-option -g default-client-command attach # Don't kill windows on exit of the command that's running in them. # Then you can use C-b-: and :respawn-window to restart the window with the command. set-option -g remain-on-exit on new-session -s DEFAULT top new-window radeontop new-window new-window mc new-window