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

Vim+cscope+ctags+taglist
Vim+cscope+ctags+taglistVim+cscope+ctags+taglist
Vim+cscope+ctags+taglist
Picker Weng
 
Instal vnc in cent os
Instal vnc in cent osInstal vnc in cent os
Instal vnc in cent os
Manusia Tenan
 
Emuladores
EmuladoresEmuladores
Emuladores
Bayoch
 

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 Uses of tmux explained

Linux Shortcuts and Commands:
Linux Shortcuts and Commands:Linux Shortcuts and Commands:
Linux Shortcuts and Commands:
wensheng wei
 
Easy distributed load test with Tsung
Easy distributed load test with TsungEasy distributed load test with Tsung
Easy distributed load test with Tsung
Ngoc Dao
 
7 unixsecurity
7 unixsecurity7 unixsecurity
7 unixsecurity
richarddxd
 
Linux conf-admin
Linux conf-adminLinux conf-admin
Linux conf-admin
badamisri
 

Similar to Uses of tmux explained (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

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Recently uploaded (20)

Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 

Uses of tmux explained