Tmux and Tmuxinator ~ Rise of the Machines
-
Upload
brian-loomis -
Category
Technology
-
view
201 -
download
2
description
Transcript of Tmux and Tmuxinator ~ Rise of the Machines
![Page 1: Tmux and Tmuxinator ~ Rise of the Machines](https://reader033.fdocuments.in/reader033/viewer/2022061121/546f5019b4af9f220c8b468a/html5/thumbnails/1.jpg)
tmux and
tmuxinator rise of the machines
![Page 2: Tmux and Tmuxinator ~ Rise of the Machines](https://reader033.fdocuments.in/reader033/viewer/2022061121/546f5019b4af9f220c8b468a/html5/thumbnails/2.jpg)
I’ll be back.
• tmux is a terminal multiplexer.
• allows you to save the state of terminal sessions and reattach later.
• sessions are persistent and will survive accidental disconnection.
![Page 3: Tmux and Tmuxinator ~ Rise of the Machines](https://reader033.fdocuments.in/reader033/viewer/2022061121/546f5019b4af9f220c8b468a/html5/thumbnails/3.jpg)
![Page 4: Tmux and Tmuxinator ~ Rise of the Machines](https://reader033.fdocuments.in/reader033/viewer/2022061121/546f5019b4af9f220c8b468a/html5/thumbnails/4.jpg)
create a session
![Page 5: Tmux and Tmuxinator ~ Rise of the Machines](https://reader033.fdocuments.in/reader033/viewer/2022061121/546f5019b4af9f220c8b468a/html5/thumbnails/5.jpg)
exit the session
![Page 6: Tmux and Tmuxinator ~ Rise of the Machines](https://reader033.fdocuments.in/reader033/viewer/2022061121/546f5019b4af9f220c8b468a/html5/thumbnails/6.jpg)
now create a named session
![Page 7: Tmux and Tmuxinator ~ Rise of the Machines](https://reader033.fdocuments.in/reader033/viewer/2022061121/546f5019b4af9f220c8b468a/html5/thumbnails/7.jpg)
detaching and attaching to sessions
• detach:> C-b
• attach:> tmux attach -t catproof
![Page 8: Tmux and Tmuxinator ~ Rise of the Machines](https://reader033.fdocuments.in/reader033/viewer/2022061121/546f5019b4af9f220c8b468a/html5/thumbnails/8.jpg)
examining sessions
• create another session and then detach:> tmux new -s humanproof>> C-b d
• show all tmux session:> tmux ls
![Page 9: Tmux and Tmuxinator ~ Rise of the Machines](https://reader033.fdocuments.in/reader033/viewer/2022061121/546f5019b4af9f220c8b468a/html5/thumbnails/9.jpg)
examining sessions
![Page 10: Tmux and Tmuxinator ~ Rise of the Machines](https://reader033.fdocuments.in/reader033/viewer/2022061121/546f5019b4af9f220c8b468a/html5/thumbnails/10.jpg)
killing sessions
• kill a session:> tmux kill-session -t humanproof
![Page 11: Tmux and Tmuxinator ~ Rise of the Machines](https://reader033.fdocuments.in/reader033/viewer/2022061121/546f5019b4af9f220c8b468a/html5/thumbnails/11.jpg)
wait what?
• attach to or kill a session:> tmux attach -t catproof> tmux kill-session -t catproof
• create a session:> tmux new -s cat proof
• yes it’s different flags, -i before e except after c-just remember it..
![Page 12: Tmux and Tmuxinator ~ Rise of the Machines](https://reader033.fdocuments.in/reader033/viewer/2022061121/546f5019b4af9f220c8b468a/html5/thumbnails/12.jpg)
working with panes
• attach to a session:> tmux attach -t
• split vertically:> C-b %
• split window horizontally:> C-b “
![Page 13: Tmux and Tmuxinator ~ Rise of the Machines](https://reader033.fdocuments.in/reader033/viewer/2022061121/546f5019b4af9f220c8b468a/html5/thumbnails/13.jpg)
this is too complex. can’t we automate it?
![Page 14: Tmux and Tmuxinator ~ Rise of the Machines](https://reader033.fdocuments.in/reader033/viewer/2022061121/546f5019b4af9f220c8b468a/html5/thumbnails/14.jpg)
tmuxinatorhttps://github.com/tmuxinator/tmuxinator
![Page 15: Tmux and Tmuxinator ~ Rise of the Machines](https://reader033.fdocuments.in/reader033/viewer/2022061121/546f5019b4af9f220c8b468a/html5/thumbnails/15.jpg)
install and create a project
• install the gem:> gem install tmuxinatorfollow README for shell configuration.
• create a new project:> tmuxinator open catproof project conf ~/.tmuxinator/catproof.yml
![Page 16: Tmux and Tmuxinator ~ Rise of the Machines](https://reader033.fdocuments.in/reader033/viewer/2022061121/546f5019b4af9f220c8b468a/html5/thumbnails/16.jpg)
yml session description
![Page 17: Tmux and Tmuxinator ~ Rise of the Machines](https://reader033.fdocuments.in/reader033/viewer/2022061121/546f5019b4af9f220c8b468a/html5/thumbnails/17.jpg)
launch a tmuxinator session
• launch:> tmuxinator catproof
![Page 18: Tmux and Tmuxinator ~ Rise of the Machines](https://reader033.fdocuments.in/reader033/viewer/2022061121/546f5019b4af9f220c8b468a/html5/thumbnails/18.jpg)
![Page 19: Tmux and Tmuxinator ~ Rise of the Machines](https://reader033.fdocuments.in/reader033/viewer/2022061121/546f5019b4af9f220c8b468a/html5/thumbnails/19.jpg)
![Page 20: Tmux and Tmuxinator ~ Rise of the Machines](https://reader033.fdocuments.in/reader033/viewer/2022061121/546f5019b4af9f220c8b468a/html5/thumbnails/20.jpg)
![Page 21: Tmux and Tmuxinator ~ Rise of the Machines](https://reader033.fdocuments.in/reader033/viewer/2022061121/546f5019b4af9f220c8b468a/html5/thumbnails/21.jpg)
pane management
• move between panes:>> C-b 1>> C-b 2
• close a pane by typing `exit` in that pane
![Page 22: Tmux and Tmuxinator ~ Rise of the Machines](https://reader033.fdocuments.in/reader033/viewer/2022061121/546f5019b4af9f220c8b468a/html5/thumbnails/22.jpg)
why is this important?
• create project specific terminal multiplexing experiences
• save states or share sessions on development servers
• pair with others
![Page 23: Tmux and Tmuxinator ~ Rise of the Machines](https://reader033.fdocuments.in/reader033/viewer/2022061121/546f5019b4af9f220c8b468a/html5/thumbnails/23.jpg)
– Terminator
“I am a friend of Sarah Connor. I was told she was here. Could I see her please?”
![Page 24: Tmux and Tmuxinator ~ Rise of the Machines](https://reader033.fdocuments.in/reader033/viewer/2022061121/546f5019b4af9f220c8b468a/html5/thumbnails/24.jpg)
• https://www.pragprog.com/book/bhtmux/tmux
• http://waynesimmerson.ca/files/Tmux-cheatsheet.pdf
• http://www.cheatography.com/bechtold/cheat-sheets/tmux-the-terminal-multiplexer/
• http://www.circuidipity.com/tmux.html