Screen, Tmux, Window, Session
Screen #
http://neophob.com/2007/04/gnu-screen-cheat-sheet/
CMD | Description |
---|---|
screen -ls |
list all ( format: pid.session_name ) |
screen |
create session |
screen -S session_name |
create session with name |
screen -r session_name |
re-attach |
screen -dr session_name |
de- & re- attach /_ force detach and then attach, use this when previous attachment is dropped due to network failure _/ |
screen -wipe |
remove dead |
kill <pid> |
kill session |
killall screen |
kill all |
C+a , C+d |
detach |
C+a, [ / Esc, C+u / C+d |
scroll half a page ref |
C+a, [ / Esc, Page Up /Down |
scroll a full page (cursor up/down is moving the cursor) |
NA | switch session //can NOT find a good method |
screen windows (tabs) #
C+a , c
create new windowC+a , A
set window nameC+a , w
window listC+a , "
choose windowC+a , d
detach windowC+a , ?
helpC+a , [
copy: move cursor & press ENTER, move & select, ENTER to copy to bufferC+a , ]
paste from bufferC+a , n
window nextC+a , p
window previousC+a , 2
switch to window no. 2C+a , C+a
switch to the window that you just left
Tmux #
https://gist.github.com/MohamedAlaa/2961058
CMD | Description |
---|---|
tmux ls |
list all * |
tmux new -s session_name |
create |
tmux a -t session_name |
re-attach |
tmux kill-session -t session_name |
kill session |
tmux kill-server |
Kill all |
<mouse wheel> |
scroll |
C+b , [ , page_up/_down |
scroll (q to exit) |
C+u / C+d |
scroll (need .tmux.conf) |
C+b , d |
detach |
C+b , s |
switch session |
C+b , % |
create new vertical split |
C+b , ← / → |
switch among vertical splits |
*: ( session_name is the one before colon “:” symbol, the first string part of each line )
tmux windows (tabs) #
C+b, c
create windowC+b, w
windows listC+b, n
next windowC+b, p
previous windowC+b, f
find windowC+b, ,
rename windowC+b, &
kill windowC+b, f
find windowC+b, ,
rename windowC+b, &
kill window