Basic tmux Tutorial - Windows, Panes, and Sessions over SSH

preview_player
Показать описание
How to manage your remote terminal sessions with tmux. If you keep lots of terminal windows open or use a tiling window manager such as i3, you'll love tmux for doing the same thing on a remote machine. This video covers the basics of using tmux.

# session management
tmux ls (or tmux list-sessions)
tmux new -s session-name
Ctrl-b d Detach from session
tmux attach -t [session name]
tmux kill-session -t session-name

Ctrl-b c Create new window
Ctrl-b d Detach current client
Ctrl-b l Move to previously selected window
Ctrl-b n Move to the next window
Ctrl-b p Move to the previous window
Ctrl-b & Kill the current window
Ctrl-b , Rename the current window
Ctrl-b q Show pane numbers (used to switch between panes)
Ctrl-b o Switch to the next pane
Ctrl-b ? List all keybindings

# moving between windows
Ctrl-b n (Move to the next window)
Ctrl-b p (Move to the previous window)
Ctrl-b l (Move to the previously selected window)
Ctrl-b w (List all windows / window numbers)
Ctrl-b window number (Move to the specified window number, the
default bindings are from 0 -- 9)

# Tiling commands
Ctrl-b % (Split the window vertically)
CTRL-b " (Split window horizontally)
Ctrl-b o (Goto next pane)
Ctrl-b q (Show pane numbers, when the numbers show up type the key to go to that pane)
Ctrl-b { (Move the current pane left)
Ctrl-b } (Move the current pane right)

# Make a pane its own window
Ctrl-b : "break-pane"

bind | split-window -h
bind - split-window -v

##########################

Рекомендации по теме
Комментарии
Автор

Create a new horizontal pane : ctrl + b + "
Create a new vertical pane : ctrl + b + %
Switch between panes : ctrl + b + <arrow keys>
Shut a pane : ctrl + b + x

thyagtubes
Автор

8 years later and this video is still relevant! Thanks a ton!

strykerk
Автор

Thanks for this video. We were asked to start using tmux at work, but never really understood how it works. This is amazing.

AMMbeatz
Автор

Thank you so much for this! I can't tell you how many tmux videos i've seen were the person just walks through their work flow, making all these cool things happen, and never, ever once talk about the commands they used to make tmux so sweet. This is awesome! I'll certainly be using tmux more often thanks to you.

djjfresco
Автор

Hey, to split into two panes horizontally, you can do Ctrl-b "
No need for named commands.

Ovatsug-x
Автор

It is indeed revolutionary. Before discovering tmux, I was like I had no idea how to keep my GridSearch running for hours and hours. Tmux saved my life 😅. Seriously, one of the best tools ever made.

Thanks for this brief and rapid introduction to tmux! And thanks for providing a cheatsheet.

kareemjeiroudi
Автор

While on a tmux session with multiple split screens, you can change the current screen width and height holding ctrl+b+direction arrow. For example, ctrl+b+left arrow expands the window towards the left.

PianoSmooth
Автор

CTRL + B followed by " splits horizontally. Welcome!

riyazmdpechu
Автор

I made it halfway through your course now and it was so helpful, now i signed up for the udemy course as well - 10 bucks is a steal ! You're doing great work, thx for everything.

BlueGlassesVIDS
Автор

Just started using tmux, really useful stuff. This video covers the basics nicely.

Dergeick
Автор

You broke this down in a super digestible way, thanks! As a dev I’m looking to move more towards the terminal. I don’t find myself shelling in to servers very often, but this makes it feel like your not bashing around inside of a black void somewhere ha! Giving it a shot!

QWEEKEN
Автор

Hey man, this is one of the best tmux tutorial I've seen so far. Subscribed!

AmazzzingZEUS
Автор

This is super helpful in understanding the value of tmux. Thank you man!

videogamesare
Автор

This is life changing for me - thank you for such a straightforward explanation.

willemjohannes
Автор

Your video lesson made my life easier to get grip on tmux. Thank you brother.

ramachandra
Автор

Awesome quick demo of the most useful features! thank you!

SiddhantEkale
Автор

Use ctrl-b + d to detach from session as explained at 9:09. This is what I came for.

TommyCarstensen
Автор

Learned a lot from this video! htop blows my mind as well!

TimothyBramlett
Автор

I couldn't even make it to the end of the video before I had to make this comment to you...


You are the best ever! EvER EVER EVER!! This video (videos I'm sure) is the single, best-video-ever-made! I don't know where you came from man but you're the best ever cause you tell us just exactly what we want to know and in a way that your viewers leave knowing how to do things. I don't learn from any just way things are presented but you really deliver.


I hope you never stop sharing with us man. Thanks a whole bunch.

You have a good one now..

ventures
Автор

Thanks, succinct to the point with the requisite amount of overload. I love it!

johndubchak