diff options
| author | Vito Graffagnino <vito@graffagnino.xyz> | 2020-09-08 18:10:49 +0100 |
|---|---|---|
| committer | Vito Graffagnino <vito@graffagnino.xyz> | 2020-09-08 18:10:49 +0100 |
| commit | 3b0142cedcde39e4c2097ecd916a870a3ced5ec6 (patch) | |
| tree | 2116c49a845dfc0945778f2aa3e2118d72be428b /vimwiki/Tmux.md | |
| parent | 8cc927e930d5b6aafe3e9862a61e81705479a1b4 (diff) | |
Added the relevent parts of the .config directory. Alss add ssh config
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 |
