Last active
October 3, 2023 08:55
-
-
Save alexjaw/cc8a6d1240a5d4337c49b64ff64de1df to your computer and use it in GitHub Desktop.
tmux notes
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
# tmux | |
todo: | |
- C-b :setw synchronize-panes | |
see tmux-notes.txt, https://gist.github.com/alexjaw | |
https://github.com/tmux-plugins | |
https://arcolinux.com/everthing-you-need-to-know-about-tmux-introduction/ | |
https://www.hamvocke.com/blog/a-quick-and-easy-guide-to-tmux/ | |
https://tmuxcheatsheet.com/ | |
https://www.youtube.com/watch?v=LPGBIjRrK4Q&t=8s&ab_channel=JanKoch | |
C-b % left and right | |
C-b " top and bottom | |
C-b <arrow> navigation | |
C-b s list sessions...neat! | |
exit close pane | |
C-b:kill-session, exit and close whole session | |
C-b c new window | |
C-b p navigate windows | |
C-b <number> navigate windows by number | |
C-b d detach | |
C-b [ enable scroll in window | |
C-b:resize-p -<D/U/L/R> <number>, will resize the pane | |
tmux ls list sessions | |
tmux attach -t <number> attach to session | |
# tmux plugins | |
https://arcolinux.com/everything-you-need-to-know-about-tmux-plugins-manager/ | |
https://github.com/tmux-plugins | |
# saving sessions so that they can be restored after restart | |
https://github.com/tmux-plugins/tmux-resurrect | |
https://vimeo.com/104763018 | |
prefix + Ctrl-s - save | |
prefix + Ctrl-r - restore | |
# color prompt (Ubuntu 20) | |
ref: https://unix.stackexchange.com/questions/320465/new-tmux-sessions-do-not-source-bashrc-file | |
Add to ~/.profile | |
source ~/.bashrc | |
https://unix.stackexchange.com/questions/360545/tmux-not-colorizing-ps1-prompt | |
Add | |
set -g default-terminal "xterm-256color" | |
to ~/.tmux.conf. | |
# Terminology | |
- panes, split tmux window into several terminals, everything about panes https://arcolinux.com/everthing-you-need-to-know-about-tmux-panes/ | |
- servers hold one or more sessions. The nice thing is that we can attach to these sessions since the server runs them even when the clint has detached. All about servers and sessions, https://arcolinux.com/everthing-you-need-to-know-about-tmux-servers-and-sessions/ | |
- tmux list-clients, query server for list of active clients | |
- session, hold one or more windows, all about sessions https://arcolinux.com/everthing-you-need-to-know-about-tmux-servers-and-sessions/. A session is like a Virtualbox. Sessions are persistent. | |
- tmux new-session -t <session name> | |
- C-b s list sessions | |
- C-b:kill-session, exit and close whole session | |
- window, hold on or more panes, as a tab in a notebook, all about windows https://arcolinux.com/everthing-you-need-to-know-about-tmux-windows/ | |
- C-b c create window | |
- C-b n next window | |
- C-b , rename window | |
- tmux list-window |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment