Screen, Tmux, Window, Session

Screen, Tmux, Window, Session

2015-12-09. Category & Tags: Nix, Soft&Skills Nix, Soft&Skills

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 window
  • C+a , A set window name
  • C+a , w window list
  • C+a , " choose window
  • C+a , d detach window
  • C+a , ? help
  • C+a , [ copy: move cursor & press ENTER, move & select, ENTER to copy to buffer
  • C+a , ] paste from buffer
  • C+a , n window next
  • C+a , p window previous
  • C+a , 2 switch to window no. 2
  • C+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 window
  • C+b, w windows list
  • C+b, n next window
  • C+b, p previous window
  • C+b, f find window
  • C+b, , rename window
  • C+b, & kill window
  • C+b, f find window
  • C+b, , rename window
  • C+b, & kill window