![Page 1: tmux - An overview of the features of this powerful terminal multiplexer](https://reader031.vdocuments.site/reader031/viewer/2022020218/55a2c6231a28ab77158b476f/html5/thumbnails/1.jpg)
tmuxv1.9a
Terminal Awsomeness
![Page 2: tmux - An overview of the features of this powerful terminal multiplexer](https://reader031.vdocuments.site/reader031/viewer/2022020218/55a2c6231a28ab77158b476f/html5/thumbnails/2.jpg)
Before we beginPhones quiet please
Thank you
![Page 3: tmux - An overview of the features of this powerful terminal multiplexer](https://reader031.vdocuments.site/reader031/viewer/2022020218/55a2c6231a28ab77158b476f/html5/thumbnails/3.jpg)
Today's subjects...
What is tmux?How to control tmuxDemo of significant featuresQuestions from you
![Page 4: tmux - An overview of the features of this powerful terminal multiplexer](https://reader031.vdocuments.site/reader031/viewer/2022020218/55a2c6231a28ab77158b476f/html5/thumbnails/4.jpg)
Random bits about me
I'm a long time Unix consultantI spend alot of time in terminalsI enjoy using good toolsI like to share good ideas
![Page 5: tmux - An overview of the features of this powerful terminal multiplexer](https://reader031.vdocuments.site/reader031/viewer/2022020218/55a2c6231a28ab77158b476f/html5/thumbnails/5.jpg)
What is tmux?tmux is a terminal multiplexer
"it enables a number of terminals to be created,accessed, and controlled from a single screen."
Indeed... like GNU screen.
![Page 6: tmux - An overview of the features of this powerful terminal multiplexer](https://reader031.vdocuments.site/reader031/viewer/2022020218/55a2c6231a28ab77158b476f/html5/thumbnails/6.jpg)
What it can look like
![Page 7: tmux - An overview of the features of this powerful terminal multiplexer](https://reader031.vdocuments.site/reader031/viewer/2022020218/55a2c6231a28ab77158b476f/html5/thumbnails/7.jpg)
Why use it?
Session persistenceOne connection, multiple sessionsPower... more on that in a minute
![Page 8: tmux - An overview of the features of this powerful terminal multiplexer](https://reader031.vdocuments.site/reader031/viewer/2022020218/55a2c6231a28ab77158b476f/html5/thumbnails/8.jpg)
What makes it special?
easily and extensively configurablepowerful tilingscripted controlgood documentationactively maintainedclean code --> easy to contributecan be found by Google et al
![Page 9: tmux - An overview of the features of this powerful terminal multiplexer](https://reader031.vdocuments.site/reader031/viewer/2022020218/55a2c6231a28ab77158b476f/html5/thumbnails/9.jpg)
How does it work?
client --> server --> sessions --> windows --> panes
![Page 10: tmux - An overview of the features of this powerful terminal multiplexer](https://reader031.vdocuments.site/reader031/viewer/2022020218/55a2c6231a28ab77158b476f/html5/thumbnails/10.jpg)
Time for action
Controlling tmux
and
Basic window management
![Page 11: tmux - An overview of the features of this powerful terminal multiplexer](https://reader031.vdocuments.site/reader031/viewer/2022020218/55a2c6231a28ab77158b476f/html5/thumbnails/11.jpg)
Controling tmux - 1/5Using the shell
(Notice: Tab completion)
tmux (=tmux new‐session)tmux new‐windowtmux newwtmux list‐windowstmux detach‐clienttmux attach
As you can see... very scriptable indeed.
![Page 12: tmux - An overview of the features of this powerful terminal multiplexer](https://reader031.vdocuments.site/reader031/viewer/2022020218/55a2c6231a28ab77158b476f/html5/thumbnails/12.jpg)
Controling tmux - 2/5Using the built in command-prompt
(Notice: Command history and tab completion)
newwsplit ‐hrename‐windowprevious‐window
![Page 13: tmux - An overview of the features of this powerful terminal multiplexer](https://reader031.vdocuments.site/reader031/viewer/2022020218/55a2c6231a28ab77158b476f/html5/thumbnails/13.jpg)
Controling tmux - 3/5Using shortcuts
Prefix Key + Commandkey
C‐a c (create new window)C‐a C‐a (goto last window)C‐a C‐n (goto next window)C‐a C‐p (goto previous window)C‐a 2 (jump to window number)C‐a ‐ (new horizontal split)C‐a , (rename window)C‐a d (detach)
![Page 14: tmux - An overview of the features of this powerful terminal multiplexer](https://reader031.vdocuments.site/reader031/viewer/2022020218/55a2c6231a28ab77158b476f/html5/thumbnails/14.jpg)
Controling tmux - 4/5Using the mouse
Window selectionPane selectionPane resizingText selection
Cute? Yes.Practical? You decide.
![Page 15: tmux - An overview of the features of this powerful terminal multiplexer](https://reader031.vdocuments.site/reader031/viewer/2022020218/55a2c6231a28ab77158b476f/html5/thumbnails/15.jpg)
Controling tmux - 5/5Using the config files, lots can be customized.
/etc/tmux.conf$HOME/.tmux.conf
Session intializationLayout and colors of all status bar itemsExtending status bar with shell scriptsKeyboard shortcuts / macrosGeneral behaviour of tmux
Too much to mention here
![Page 16: tmux - An overview of the features of this powerful terminal multiplexer](https://reader031.vdocuments.site/reader031/viewer/2022020218/55a2c6231a28ab77158b476f/html5/thumbnails/16.jpg)
An example config file
# This is a very simplified tmux config exampleunbind C‐bset ‐g prefix C‐abind C‐a last‐windowbind C‐c new‐windowbind ‐ split‐window ‐vbind \ split‐window ‐hset ‐g status‐right "#[fg=#44ff44]@#H %d‐%b‐%y %H:%M"set ‐g mode‐keys vineww ‐n jodeli
![Page 17: tmux - An overview of the features of this powerful terminal multiplexer](https://reader031.vdocuments.site/reader031/viewer/2022020218/55a2c6231a28ab77158b476f/html5/thumbnails/17.jpg)
Tiling
Create / SplitNavigateCustom layoutsStandard layoutsRearrangeZoomBreak / JoinDelete / Kill
And last but not least...
![Page 18: tmux - An overview of the features of this powerful terminal multiplexer](https://reader031.vdocuments.site/reader031/viewer/2022020218/55a2c6231a28ab77158b476f/html5/thumbnails/18.jpg)
Synchronous input!
![Page 19: tmux - An overview of the features of this powerful terminal multiplexer](https://reader031.vdocuments.site/reader031/viewer/2022020218/55a2c6231a28ab77158b476f/html5/thumbnails/19.jpg)
Buffer manipulation
vi or emacs control modenavigate (always in copy mode)searchselect and copy text (line or block)past buffer (last or selected)save selected bufferrealtime logging to file
![Page 20: tmux - An overview of the features of this powerful terminal multiplexer](https://reader031.vdocuments.site/reader031/viewer/2022020218/55a2c6231a28ab77158b476f/html5/thumbnails/20.jpg)
ScriptingAn example: Opening a window with multiple ssh connections
Open a new windowCreate 4 panesStart ssh in each paneLog the output of each tile to diskEnable synchronized input
Can also be done on startup to initialize new sessions.
![Page 21: tmux - An overview of the features of this powerful terminal multiplexer](https://reader031.vdocuments.site/reader031/viewer/2022020218/55a2c6231a28ab77158b476f/html5/thumbnails/21.jpg)
Session sharing
1. Start a tmux session with a given socket path
2. Allow rw access to socket for group/users
3. Other user starts 'tmux attach' using the shared socket
tmux ‐S /tmp/tmux‐shared new
chown 777 /tmp/tmux‐shared
tmux ‐S /tmp/tmux‐shared attach
![Page 22: tmux - An overview of the features of this powerful terminal multiplexer](https://reader031.vdocuments.site/reader031/viewer/2022020218/55a2c6231a28ab77158b476f/html5/thumbnails/22.jpg)
Monitoring (in)activity
monitor panes for (in)activitymonitor panes for stringschanges on status bar indicates event
![Page 23: tmux - An overview of the features of this powerful terminal multiplexer](https://reader031.vdocuments.site/reader031/viewer/2022020218/55a2c6231a28ab77158b476f/html5/thumbnails/23.jpg)
Showing tmux stateThere are several commands to show the state of tmux
info : show server status (clients,sessions,windows,panes)show‐options ‐g : show tmux server settingsshow‐options ‐wg : show window settingslist‐commands : show available tmux commandslist‐keys : show bound keyslist‐sessions (ls)
Start tmux ‐v and get a very detailed client log in the startup dir.
and much more...
![Page 24: tmux - An overview of the features of this powerful terminal multiplexer](https://reader031.vdocuments.site/reader031/viewer/2022020218/55a2c6231a28ab77158b476f/html5/thumbnails/24.jpg)
Cygwintmux is nowadays packaged with Cygwin
and works like a charm.
![Page 25: tmux - An overview of the features of this powerful terminal multiplexer](https://reader031.vdocuments.site/reader031/viewer/2022020218/55a2c6231a28ab77158b476f/html5/thumbnails/25.jpg)
Documentation
man tmux
tmux.sourceforge.nettmux FAQmany online examples
![Page 26: tmux - An overview of the features of this powerful terminal multiplexer](https://reader031.vdocuments.site/reader031/viewer/2022020218/55a2c6231a28ab77158b476f/html5/thumbnails/26.jpg)
Summarytmux is...
powerfulflexible
well documented
something you really ought to have in your toolkit
![Page 27: tmux - An overview of the features of this powerful terminal multiplexer](https://reader031.vdocuments.site/reader031/viewer/2022020218/55a2c6231a28ab77158b476f/html5/thumbnails/27.jpg)
That's all for now.This slideshow is available on
NOTE: Do check out the embedded note ("asides") in this reveal.js slideshow.slideshare.net
![Page 28: tmux - An overview of the features of this powerful terminal multiplexer](https://reader031.vdocuments.site/reader031/viewer/2022020218/55a2c6231a28ab77158b476f/html5/thumbnails/28.jpg)
Questions?
![Page 29: tmux - An overview of the features of this powerful terminal multiplexer](https://reader031.vdocuments.site/reader031/viewer/2022020218/55a2c6231a28ab77158b476f/html5/thumbnails/29.jpg)
Thank you!