Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Introduction to screen, tmux & teamocil

Introduction to screen, tmux & teamocil

1f135de4ac57d1eb89bab274175a4d66?s=128

Diego Sapriza

June 26, 2013
Tweet

Transcript

  1. screen & tmux Brought you by @AV4TAr

  2. ups, connection dropped... 2

  3. why? • more than one window in a session. •

    more than one pane in a window. • keep processes running in background. "AHH, connection dropped during migration..." - No more :) 3
  4. screen

  5. screen basics • start: ~ screen • list sessions: ~

    screen -ls • attach: ~ screen -r [session-number] available for Linux / Mac / Cygwin 5
  6. screen basics • Prefix: Ctrl-a • new window: Ctrl-a c

    • list windows: Ctrl-a " • detach: Ctrl-a d quick reference http://bit.ly/screen-quick-reference 6
  7. Show time!

  8. tmux

  9. tmux • like screen but better. • client - server.

    9
  10. tmux basics • start: ~ tmux • list sessions: ~

    tmux list-sessions • list connected clients: ~ tmux list-clients • attach: ~ tmux attach-session [-t session-number] available for Linux / Mac / Cygwin 10
  11. tmux basics • Prefix: Ctrl-b • new window: Ctrl-b c

    • vertical pane split: Ctrl-b " • horizontal pane split: Ctrl-b % • move through panes: Ctrl-b arrows • detach: Ctrl-b d • help: Ctrl-b ? 11
  12. Demooooo 12

  13. a bit of magic teamocil

  14. What is teamocil? simple tool used to automatically create sessions,

    windows and panes in tmux with YAML files. http://teamocil.com/ 14
  15. teamocil basics ~ gem install teamocil ~ mkdir ~/.teamocil ~

    teamocil --edit sample ~ tmux ~ teamocil sample 15
  16. ~/.teamocil/four.yml windows: - name: "four-panes" root: "~/Code/sample/www" layout: tiled panes:

    - cmd: "top" - cmd: "tail -f /var/log/apache2/error.log" - cmd: "tail -f /var/log/mail.log" - cmd: "ping google.com" 01. 02. 03. 04. 05. 06. 07. 08. 09. 16
  17. live stuff

  18. gracias. @AV4TAr 18

  19. resources • tmux: Productive Mouse-Free Development - book • tmux

    Quick Start - youtube • http://teamocil.com/ • done with Showerjs 19