Skip to content

Instantly share code, notes, and snippets.

@zhangyangjing
Last active November 18, 2019 13:53
Show Gist options
  • Save zhangyangjing/44bd9c484e9229b7c409ffc538ea2d12 to your computer and use it in GitHub Desktop.
Save zhangyangjing/44bd9c484e9229b7c409ffc538ea2d12 to your computer and use it in GitHub Desktop.
start Tmux shell
#!/bin/sh
# see: https://gist.github.com/todgru/6224848
session="one1"
tmux start-server
tmux new-session -d -s $session
tmux send-keys C-m # ignore errors. see:https://github.com/tmux/tmux/issues/1173#issuecomment-347496
tmux send-keys "docker exec -it nginx tail -f /var/log/nginx/web.access.log" C-m
tmux splitw -h
tmux send-keys "htop" C-m
tmux splitw -v
tmux send-keys "sudo iftop" C-m "t"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment