Created
August 24, 2019 18:19
-
-
Save quangv/472d6bf6fc07fd6e303edea5565b4f2d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://www.youtube.com/watch?v=BHhA_ZKjyxo | |
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. | |
A quick cheatsheet (partially inspired by http://www.danielmiessler.com/study/t... ): | |
# 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" | |
# add to ~/.tmux.conf | |
bind | split-window -h | |
bind - split-window -v | |
########################## | |
Free Linux Sysadmin Course Playlist: https://www.youtube.com/playlist?list... | |
Check out my step-by-step project-based Linux course for beginners, 93% off when you use this link: https://www.udemy.com/hands-on-linux-... | |
Official Site & e-mail list: https://tutorialinux.com/ | |
Twitter: https://twitter.com/tutorialinux | |
Facebook: https://www.facebook.com/tutorialinux | |
Patreon: https://www.patreon.com/tutorialinux | |
Podcast: http://kernelpanicpodcast.com |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment