Skip to content

Instantly share code, notes, and snippets.

@mdjaman
Forked from P7h/tmux_vs_screen.md
Created September 26, 2024 11:54
Show Gist options
  • Save mdjaman/1e527f6fb8dda40bfb3483587d0fc74f to your computer and use it in GitHub Desktop.
Save mdjaman/1e527f6fb8dda40bfb3483587d0fc74f to your computer and use it in GitHub Desktop.
tmux vs screen commands

tmux vs. screen commands


Action tmux screen
start a new session tmux
tmux new
tmux new-session
screen
start a new session with a name tmux new -s name screen -S name
re-attach a detached session tmux attach
tmux attach-session
screen -r
re-attach a detached session with a name tmux attach -t name
tmux a -t name
screen -r name
re-attach an attached session (detaching it from elsewhere) tmux attach -d
tmux attach-session -d
screen -dr
re-attach an attached session (keeping it attached elsewhere) tmux attach
tmux attach-session
screen -x
detach from currently attached session ^b d
^b :detach
^a d
rename-window to newname ^b ,
^b :rename-window
^a A newname
list windows ^b w ^a w
list windows in chooseable menu ^a "
go to window # ^b # ^a #
go to last-active window ^b l ^a l
go to next window ^b n ^a n
go to previous window ^b p ^a p
see keybindings ^b ? ^a ?
list sessions ^b s
tmux ls
tmux list-sessions
screen -ls
toggle visual bell ^a ^g
kill the current pane ^b x
logout
^D
^a X
destroy the current window ^b & ^a k
^a ^k
exit current shell ^d ^d
create another window ^b c ^a c
switch to another pane ^b o ^a Tab
split pane horizontally ^b " ^a S
then ^a Tab
and ^a c
split pane vertically ^b % ^a |
then ^a Tab
and ^a c
close other panes except the current one ^b !
swap location of panes ^b ^o
re-arrange current panes within same window (different layouts) ^a space
show time ^b t
show numeric values of panes ^b q
enable scroll / view scrollback ^b [
(and to exit q)
^a [
(and to exit q)
copy text in one view ^a [ ^m
(highlight text and enter)
(to save: ^a >)
paste text into a view ^a ]

Other references

Extended from tmux & screen cheat-sheet.

tmux

screen

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