A Gentle Introduction to tmux

Alek Shnayder
Jul 5, 2017 · 7 min read
Image for post
Image for post
tmux running on a remote Ubuntu server, with vtop on the top pane and PM2 on the bottom

What is tmux?


Installation

MacOS Installation

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install tmux
tmux -V

Ubuntu / Debian Linux Installation

sudo apt-get update
sudo apt-get install tmux
tmux -V

Getting In & Getting Out

Image for post
Image for post
Default view after starting new session

Using Prefix

Image for post
Image for post
ctrl+b :” to get tmux command prompt

Attach, Detach & Kill

ctrl+b d
tmux ls
tmux attach-session -t 3

Naming Sessions

tmux new -s [name of session]
tmux a -t [name of session]

Managing Panes

ctrl+b "
ctrl+b %
Image for post
Image for post
tmux split horizontally, with lower pane split vertically
ctrl+b [arrow key]

Resizing Panes

ctrl+b :
ctrl+b :
resize-pane -D 2
Image for post
Image for post
resize-pane -D 2 being entered

Getting Fancy with Custom Themes

Image for post
Image for post
tmux running Cyan theme with 3-pane layout

Additional Resources


Summary of Primary Commands

Image for post
Image for post
Image for post
Image for post
Image for post
Image for post
Image for post
Image for post

HackerNoon.com

#BlackLivesMatter

Sign up for Get Better Tech Emails via HackerNoon.com

By HackerNoon.com

how hackers start their afternoons. the real shit is on hackernoon.com. Take a look

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy practices.

Check your inbox
Medium sent you an email at to complete your subscription.

Alek Shnayder

Written by

https://alekshnayder.com

HackerNoon.com

Elijah McClain, George Floyd, Eric Garner, Breonna Taylor, Ahmaud Arbery, Michael Brown, Oscar Grant, Atatiana Jefferson, Tamir Rice, Bettie Jones, Botham Jean

Alek Shnayder

Written by

https://alekshnayder.com

HackerNoon.com

Elijah McClain, George Floyd, Eric Garner, Breonna Taylor, Ahmaud Arbery, Michael Brown, Oscar Grant, Atatiana Jefferson, Tamir Rice, Bettie Jones, Botham Jean

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch

Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore

Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store