diff options
Diffstat (limited to 'vimwiki/Tmux.md')
| -rw-r--r-- | vimwiki/Tmux.md | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/vimwiki/Tmux.md b/vimwiki/Tmux.md new file mode 100644 index 0000000..f65e633 --- /dev/null +++ b/vimwiki/Tmux.md @@ -0,0 +1,21 @@ +# 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 |
