Here’s a quick guide on how to use tmux:
Starting a tmux Session
- Open your terminal.
- Start a new tmux session by typing:
tmux
Detaching from a Session
- To detach from the current session (leave it running in the background), press:
Ctrl + b, then d
Reattaching to a Session
- To reattach to a detached session, use:
or if you have multiple sessions:tmux attach-sessiontmux attach-session -t <session-name>
Creating a New Window
- To create a new window within the tmux session, press:
Ctrl + b, then c
Switching Between Windows
- To switch to the next window, press:
Ctrl + b, then n - To switch to the previous window, press:
Ctrl + b, then p
Splitting Windows
- To split the window horizontally, press:
Ctrl + b, then " - To split the window vertically, press:
Ctrl + b, then %
Closing a Window or Pane
- To close the current window or pane, type:
exit
Listing Sessions
- To list all tmux sessions, use:
tmux ls
Exiting tmux
- To exit tmux completely, make sure to close all windows or panes, or you can type:
exit
This should give you a good starting point for using tmux. Let me know if you need more specific commands or features!
