Tmux Commands

Posted by zbrom on June 27, 2021 · 3 mins read

tmux is a software application that can be used to multiplex several virtual consoles, allowing a user to access multiple separate terminal sessions inside a single terminal window or remote terminal session. It is useful for dealing with multiple programs from a command line interface, and for separating programs from the Unix shell that started the program. It provides much of the same functionality as GNU Screen, but is distributed under a BSD license.

I have found tmux very useful with my raspberry pi. It provides me with the capability to start an application, end an SSH session, then return to that application later.


Action tmux
start a new session tmux OR
tmux new OR
tmux new-session
re-attach a detached session tmux attach OR
tmux attach-session
re-attach an attached session (detaching it from elsewhere) tmux attach -d OR
tmux attach-session -d
re-attach an attached session (keeping it attached elsewhere) tmux attach OR
tmux attach-session
detach from currently attached session ^b d OR
^b :detach
rename-window to newname ^b , <newname> OR
^b :rename-window <newname>
list windows ^b w
list windows in chooseable menu
go to window # ^b #
go to last-active window ^b l
go to next window ^b n
go to previous window ^b p
see keybindings ^b ?
list sessions ^b s OR
tmux ls OR
tmux list-sessions
toggle visual bell
create another shell ^b c
exit current shell ^d
split pane horizontally ^b “
split pane vertically ^b %
switch to another pane ^b o
kill the current pane ^b x OR (logout/^D)
close other panes except the current one ^b !
swap location of panes ^b ^o
show time ^b t
show numeric values of panes ^b q