SlideShare a Scribd company logo
1 of 15
Download to read offline
Uses of tmux explained (for fun & sysadmin)Stanislas Polu
June 7th 2013
bit.ly/tmux-
explained
Made by nitrogr.am
What is a terminal multiplexer?
It lets you switch easily between several
programs in one terminal, detach them (they
keep running in the background) and reattach
them to a different terminal.
And do a lot more.
http://tmux.sourceforge.net
tmux
(server)
Unix Domain Socket:
/tmp/tmux-{uid}/default
pts/0 pts/1
@spolu @x1t0
tmux
(screen)
tmux
(screen)
pts/4 pts/5 pts/6
ssh bash vim
TMUX Architecture
tmux
(server)
/tmp/tmux-{uid}/default
pts/0
@spolu
tmux
(screen)
pts/4
$ tmux
bash
Starting TMUX
(openpty)
tmux
(server)
pts/0
@spolu
tmux
(screen)
pts/4
$
bash
Starting TMUX
pts/5
bash
C-b c
/tmp/tmux-{uid}/default
tmux
(server)
pts/0
@spolu
tmux
(screen)
pts/4
$ fsck /dev/md2
bash
Detach - Attach
pts/5
fsck
/tmp/tmux-{uid}/default
tmux
(server)
pts/4
$
bash
Detach - Attach
pts/5
fsck
C-b d
pts/0
@spolu
bash
/tmp/tmux-{uid}/default
tmux
(server)
pts/0
@spolu
tmux
(screen)
pts/4
$ tmux attach
bash
Detach - Attach
pts/5
fsck
/tmp/tmux-{uid}/default
tmux
(server)
/tmp/pair
pts/4
bash
Screen Sharing
pts/0
@spolu
tmux
(screen)
$ tmux -S /tmp/pair
$ chmod 777 /tmp/pair
@spolu
tmux
(server)
/tmp/pair
pts/4
$ tmux -S /tmp/pair new
$ chmod 777 /tmp/pair
bash
Screen Sharing
@spolu
pts/0 pts/1
@spolu @x1t0
tmux
(screen)
tmux
(screen)
$ tmux -S /tmp/pair attach
@x1t0
#!/bin/sh
alias tmux-shared="tmux -S /tmp/tmux-shared"
tmux-shared new-session -d -s str1
chmod 777 /tmp/tmux-shared
tmux-shared new-window -t str1:1 -n 'str1-1' 'ssh nitrogram@str1-1'
tmux-shared new-window -t str1:1 -n 'str1-2' 'ssh nitrogram@str1-2'
tmux-shared new-window -t str1:1 -n 'str1-3' 'ssh nitrogram@str1-3'
tmux-shared kill-window -t str1:0
tmux-shared select-window -t hawkhost:1
tmux-shared attach -t hawkhost
SysAdmin Trick
THIS THING IS POWERFUL, BUT...

More Related Content

What's hot

Dev Tooling for your Technohipster Startup using aws, docker, tmux, vim & ope...
Dev Tooling for your Technohipster Startup using aws, docker, tmux, vim & ope...Dev Tooling for your Technohipster Startup using aws, docker, tmux, vim & ope...
Dev Tooling for your Technohipster Startup using aws, docker, tmux, vim & ope...James Wickett
 
Tmux quick intro
Tmux quick introTmux quick intro
Tmux quick introdantleech
 
Improving your shell usage - 2009
Improving your shell usage - 2009Improving your shell usage - 2009
Improving your shell usage - 2009Chris Sinjakli
 
Introduction to Vim
Introduction to VimIntroduction to Vim
Introduction to VimBrandon Liu
 
n|u Dharamsala Humla : Memory Forensic by Tenzin Chokden
n|u Dharamsala Humla : Memory Forensic by Tenzin Chokdenn|u Dharamsala Humla : Memory Forensic by Tenzin Chokden
n|u Dharamsala Humla : Memory Forensic by Tenzin ChokdenSunil Kumar
 
20 keyboard shortcuts for your linux machine
20 keyboard shortcuts for your linux machine20 keyboard shortcuts for your linux machine
20 keyboard shortcuts for your linux machineYoussoufou YABRE
 
Installation of ubuntu, ns3 and compiling first
Installation of ubuntu, ns3 and compiling firstInstallation of ubuntu, ns3 and compiling first
Installation of ubuntu, ns3 and compiling firstJawad Khan
 
Vim+cscope+ctags+taglist
Vim+cscope+ctags+taglistVim+cscope+ctags+taglist
Vim+cscope+ctags+taglistPicker Weng
 
Instal vnc in cent os
Instal vnc in cent osInstal vnc in cent os
Instal vnc in cent osManusia Tenan
 
tmux عدنان الشعلة شرح برنامج
tmux عدنان الشعلة شرح برنامج tmux عدنان الشعلة شرح برنامج
tmux عدنان الشعلة شرح برنامج adnan alshulah
 
Silverlight and NUI
Silverlight and NUISilverlight and NUI
Silverlight and NUIAndrej Tozon
 
Emuladores
EmuladoresEmuladores
EmuladoresBayoch
 
Ultimate Unix Meetup Presentation
Ultimate Unix Meetup PresentationUltimate Unix Meetup Presentation
Ultimate Unix Meetup PresentationJacobMenke1
 
Kodar-lan - Text and editors Vi/Vim
Kodar-lan - Text and editors Vi/VimKodar-lan - Text and editors Vi/Vim
Kodar-lan - Text and editors Vi/VimTim Gremalm
 

What's hot (20)

Dev Tooling for your Technohipster Startup using aws, docker, tmux, vim & ope...
Dev Tooling for your Technohipster Startup using aws, docker, tmux, vim & ope...Dev Tooling for your Technohipster Startup using aws, docker, tmux, vim & ope...
Dev Tooling for your Technohipster Startup using aws, docker, tmux, vim & ope...
 
Tmux quick intro
Tmux quick introTmux quick intro
Tmux quick intro
 
Improving your shell usage - 2009
Improving your shell usage - 2009Improving your shell usage - 2009
Improving your shell usage - 2009
 
Vim Showcase
Vim ShowcaseVim Showcase
Vim Showcase
 
Introduction to Vim
Introduction to VimIntroduction to Vim
Introduction to Vim
 
Vim Vi Improved
Vim Vi ImprovedVim Vi Improved
Vim Vi Improved
 
n|u Dharamsala Humla : Memory Forensic by Tenzin Chokden
n|u Dharamsala Humla : Memory Forensic by Tenzin Chokdenn|u Dharamsala Humla : Memory Forensic by Tenzin Chokden
n|u Dharamsala Humla : Memory Forensic by Tenzin Chokden
 
20 keyboard shortcuts for your linux machine
20 keyboard shortcuts for your linux machine20 keyboard shortcuts for your linux machine
20 keyboard shortcuts for your linux machine
 
Installation of ubuntu, ns3 and compiling first
Installation of ubuntu, ns3 and compiling firstInstallation of ubuntu, ns3 and compiling first
Installation of ubuntu, ns3 and compiling first
 
screen and tmux
screen and tmuxscreen and tmux
screen and tmux
 
Vim+cscope+ctags+taglist
Vim+cscope+ctags+taglistVim+cscope+ctags+taglist
Vim+cscope+ctags+taglist
 
Small Screen Development
Small Screen DevelopmentSmall Screen Development
Small Screen Development
 
Instal vnc in cent os
Instal vnc in cent osInstal vnc in cent os
Instal vnc in cent os
 
tmux عدنان الشعلة شرح برنامج
tmux عدنان الشعلة شرح برنامج tmux عدنان الشعلة شرح برنامج
tmux عدنان الشعلة شرح برنامج
 
Silverlight and NUI
Silverlight and NUISilverlight and NUI
Silverlight and NUI
 
Emuladores
EmuladoresEmuladores
Emuladores
 
What Makes Bram Alkema Horny?
What Makes Bram Alkema Horny?What Makes Bram Alkema Horny?
What Makes Bram Alkema Horny?
 
Ultimate Unix Meetup Presentation
Ultimate Unix Meetup PresentationUltimate Unix Meetup Presentation
Ultimate Unix Meetup Presentation
 
Kodar-lan - Text and editors Vi/Vim
Kodar-lan - Text and editors Vi/VimKodar-lan - Text and editors Vi/Vim
Kodar-lan - Text and editors Vi/Vim
 
25 Debugging
25 Debugging25 Debugging
25 Debugging
 

Similar to Tmux explained: Terminal multiplexer for fun & sysadmin

Linux Shortcuts and Commands:
Linux Shortcuts and Commands:Linux Shortcuts and Commands:
Linux Shortcuts and Commands:wensheng wei
 
Andresen 8 21 02
Andresen 8 21 02Andresen 8 21 02
Andresen 8 21 02FNian
 
Useful Linux and Unix commands handbook
Useful Linux and Unix commands handbookUseful Linux and Unix commands handbook
Useful Linux and Unix commands handbookWave Digitech
 
A journey through the years of UNIX and Linux service management
A journey through the years of UNIX and Linux service managementA journey through the years of UNIX and Linux service management
A journey through the years of UNIX and Linux service managementLubomir Rintel
 
Advanced Level Training on Koha / TLS (ToT)
Advanced Level Training on Koha / TLS (ToT)Advanced Level Training on Koha / TLS (ToT)
Advanced Level Training on Koha / TLS (ToT)Ata Rehman
 
Easy distributed load test with Tsung
Easy distributed load test with TsungEasy distributed load test with Tsung
Easy distributed load test with TsungNgoc Dao
 
TinyOS installation Guide And Manual
TinyOS installation Guide And ManualTinyOS installation Guide And Manual
TinyOS installation Guide And ManualAnkit Singh
 
Linux for beginners
Linux for beginnersLinux for beginners
Linux for beginnersNitesh Nayal
 
7 unixsecurity
7 unixsecurity7 unixsecurity
7 unixsecurityricharddxd
 
Linux conf-admin
Linux conf-adminLinux conf-admin
Linux conf-adminbadamisri
 
Linux conf-admin
Linux conf-adminLinux conf-admin
Linux conf-adminbadamisri
 

Similar to Tmux explained: Terminal multiplexer for fun & sysadmin (20)

Linux Shortcuts and Commands:
Linux Shortcuts and Commands:Linux Shortcuts and Commands:
Linux Shortcuts and Commands:
 
Andresen 8 21 02
Andresen 8 21 02Andresen 8 21 02
Andresen 8 21 02
 
Unix 3 en
Unix 3 enUnix 3 en
Unix 3 en
 
Introduction to Linux
Introduction to LinuxIntroduction to Linux
Introduction to Linux
 
Useful Linux and Unix commands handbook
Useful Linux and Unix commands handbookUseful Linux and Unix commands handbook
Useful Linux and Unix commands handbook
 
A journey through the years of UNIX and Linux service management
A journey through the years of UNIX and Linux service managementA journey through the years of UNIX and Linux service management
A journey through the years of UNIX and Linux service management
 
Introduction to Linux
Introduction to LinuxIntroduction to Linux
Introduction to Linux
 
Advanced Level Training on Koha / TLS (ToT)
Advanced Level Training on Koha / TLS (ToT)Advanced Level Training on Koha / TLS (ToT)
Advanced Level Training on Koha / TLS (ToT)
 
.ppt
.ppt.ppt
.ppt
 
Easy distributed load test with Tsung
Easy distributed load test with TsungEasy distributed load test with Tsung
Easy distributed load test with Tsung
 
Clase10 (consola linux)
Clase10 (consola linux)Clase10 (consola linux)
Clase10 (consola linux)
 
TinyOS installation Guide And Manual
TinyOS installation Guide And ManualTinyOS installation Guide And Manual
TinyOS installation Guide And Manual
 
168054408 cc1
168054408 cc1168054408 cc1
168054408 cc1
 
Linux for beginners
Linux for beginnersLinux for beginners
Linux for beginners
 
OLUG_xen.ppt
OLUG_xen.pptOLUG_xen.ppt
OLUG_xen.ppt
 
unix-rosetta
unix-rosettaunix-rosetta
unix-rosetta
 
7 unixsecurity
7 unixsecurity7 unixsecurity
7 unixsecurity
 
Linux conf-admin
Linux conf-adminLinux conf-admin
Linux conf-admin
 
Linux Conf Admin
Linux Conf AdminLinux Conf Admin
Linux Conf Admin
 
Linux conf-admin
Linux conf-adminLinux conf-admin
Linux conf-admin
 

Recently uploaded

New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 

Recently uploaded (20)

New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 

Tmux explained: Terminal multiplexer for fun & sysadmin