🖥️tmux

➡️This is a command-line reference manual for commands and command combinations that you don’t use often enough to remember it. This cheatsheet explains the tmux command with important options and switches using examples.

▁ ▂ ▃ ▄ ꧁ 🔴☠ COMMANDLINE-KUNGFU WITH CHEATSHEETS ☠🔴꧂▅ ▃ ▂ ▁

#                ████████╗███╗   ███╗██╗   ██╗██╗  ██╗
#                ╚══██╔══╝████╗ ████║██║   ██║╚██╗██╔╝
#                   ██║   ██╔████╔██║██║   ██║ ╚███╔╝ 
#                   ██║   ██║╚██╔╝██║██║   ██║ ██╔██╗ 
#                   ██║   ██║ ╚═╝ ██║╚██████╔╝██╔╝ ██╗
#                   ╚═╝   ╚═╝     ╚═╝ ╚═════╝ ╚═╝  ╚═╝
                                                     
                

# Start tmux:
tmux

# Detach from tmux:
Ctrl-b d

# Restore tmux session:
tmux attach

# Detach an already attached session (great if you are moving devices with different screen resolutions)
tmux attach -d 

# Display session:
tmux ls

# Rename session:
Ctrl-b $

# Switch session:
Ctrl-b s

# Start a shared session:
tmux -S /tmp/your_shared_session
chmod 777 /tmp/your_shared_session

# Help screen (Q to quit):
Ctrl-b ?

# Scroll in window:
Ctrl-b PageUp/PageDown

# Reload configuation file
Ctrl-b : source-file /path/to/file

# Window management
# =================

# Create window:
Ctrl-b c

# Destroy window:
Ctrl-b x

# Switch between windows:
Ctrl-b [0-9]
or
Ctrl-b Arrows

# Split windows horizontally:
Ctrl-b %

# Split windows vertically:
Ctrl-b "

"

# In tmux, this keystroke will split your current window vertically into two parts called panes. You can also split horizontally with Ctrl-B " (double quote). Have fun.
Ctrl-B % 

#==============================##==============================#
# CMD TMUX						       #
#==============================##==============================#
tmux attach -t 2
# Pick up where you left off on tmux session 2. tmux list-sessions to see what is available.

tmux
# tmux is a great program that manages multiple terminal sessions and allows you to detach/reattach to the session. Also screen, dvtm.

tmux break-pane or <Ctrl-b>:break-pane
# Take the current tmux pane from split window and break it out into a full sized window.

tmux list-clients ; tmux detach-client -t pts/22 
# When you have 2+ tmux clients on the same session and another one is on a smaller window.

[Ctrl-b] + D 
# A keystroke for tmux to show a list of clients you can detach. Great for when one of the clients is slightly "undersized".

#==============================##==============================#
# CMD TMUX						       #
#==============================##==============================#
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░