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
...