Skip to content

Instantly share code, notes, and snippets.

@zmts
Last active June 22, 2023 13:34
Show Gist options
  • Save zmts/b62016cb8ebaf463cd7d1ad46df515ae to your computer and use it in GitHub Desktop.
Save zmts/b62016cb8ebaf463cd7d1ad46df515ae to your computer and use it in GitHub Desktop.
tmux

tmux common comands

Configure tmux

> nano ~/.tmux.conf

# default: ctrl-b
# set prefix ctrl-q
set-option -g prefix C-q                                                                                                  

# set inactive/active window styles
set -g window-style 'fg=colour247,bg=colour236'
set -g window-active-style 'fg=colour250,bg=black'

# enable mouse
set -g mouse on

Reload tmux config

> tmux source-file ~/.tmux.conf

Create new session

> tmux new-session -s session_name

List sessions

> tmux list-sessions

Exit session

> exit

Attach session

> tmux attach -t session_name

Add window

> ctrl + b
> c

Split windows vertically

> ctrl + b
> %

Split windows horizontally

> ctrl + b
> "

https://tmuxcheatsheet.com/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment