# Using shell scripting to setup your tmux environment # Can use a simple bootstrap script to setup tmux environment and log into it. example script `#!/bin/sh` `tmux new-session -d -s hawkhost` `tmux new-window -t hawkhost:1 -n 'Server1' 'ssh root@10.x.x.x'` `tmux new-window -t hawkhost:2 -n 'Server2' 'ssh root@10.x.x.x'` `tmux new-window -t hawkhost:3 -n 'Server3' 'ssh root@10.x.x.x'` `tmux new-window -t hawkhost:4 -n 'Server4' 'ssh root@10.x.x.x'` `tmux new-window -t hawkhost:5 -n 'Server5' 'ssh root@10.x.x.x'` `tmux select-window -t hawkhost:1` `tmux -2 attach-session -t hawkhost` `new-session -d -s hawkhost` creates new session, names it and detaches it. The new-window commands create 5 new windows and executes the commands. The last two commands sets the active window and then attaches to the session