If you ever worked on long task you’ll end up having the need of detaching from your terminal and come back the next day, without loosing your output.
This is where screen and tmux come handy, by making you able to detach your console and logging out.
Lately i’ve been trying to migrate from screen to tmux, mostly because tmux looks more advanced and modern from screen.
Thanks to this page it’s quite easy to migrate from screen to tmux
here’s a quick reference for you all.
The formatting here is simple enough to understand (I would hope). ^ means ctrl+, so ^x is ctrl+x. M- means meta (generally left-alt or escape)+, so M-x is left-alt+x
It should be noted that this is no where near a full feature-set of either group. This – being a cheat-sheet – is just to point out the most very basic features to get you on the road.
|start a new session||
tmux new OR
|re-attach a detached session||
tmux attach OR
|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
|detach from currently attached session||
^b d OR
^a ^d OR
|rename-window to 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 ?|
^b s OR
tmux ls OR
|toggle visual bell||^a ^g|
|create another shell||^b c||^a c|
|exit current shell||^d||^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|