Skip to content

Instantly share code, notes, and snippets.

@hansrajdas
Last active September 10, 2023 07:44
Show Gist options
  • Save hansrajdas/29e3f85cd0f6f34db9fe4b9d5146cf67 to your computer and use it in GitHub Desktop.
Save hansrajdas/29e3f85cd0f6f34db9fe4b9d5146cf67 to your computer and use it in GitHub Desktop.
TMUX basic commands

Installation

https://gist.github.com/simme/1297707

Management

Create and start a new tmux session

tmux new -s <session-name>

Attach to an already active session

tmux attach -t <session-name>

List all active sessions

tmux ls

Kill an active session

tmux kill-session -t <session-name>

Operations

In tmux window, all commands runs with CTRL-b prefixed followed by command as below

c    Create new window
w    List all windows
,    Rename current window
p    Goto previous window in list from current window
n    Goto next window in list from current window
l    Goto last used window
%    Split vertically
"    Split horizontally
d    Detach from session
t    Show big clock
:    prompt, Used to type any tmux command like :split-window to split window horizontally
s    List all sessions, can be switched to another session
[    Make page up/down and mouse scroll work on window
q    Exit from scroll mode
z    Maximize/minimize current pane

:new         Create a new session
ArrowKeys    Switch between splitted windows of a session

To resize splitted windows, keep on pressing CTRL-b and use arrow keys to adjust windows
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment