Some notes on using tmux
#linux
#tmux
Here are some useful shell alias for using tmux:
alias ta='tmux attach'
alias tn='tmux new -s'
When starting a new terminal console, it is a good idea to create a new tmux session with tn shell
command, or to attach to an existing session with ta
.
The benefit for using tmux sessions are:
- It is easier to move the sessions around (say from one terminal window to another)
- It is easier to scroll up and down using keyboard, and search for content
When already in a tmux session, the following shortcuts are useful:
C-b d # ==> Detach, i.e. get out of tmux sessions
C-b s # ==> Change to a different session
C-b [ # ==> Enter into search/copy/paste mode
C-u # ==> Page up
C-? # ==> Search
ijkl... # ==> Genearl vim moving operators
<Space> # ==> Enter selection mode
<Enter> # ==> Yank the selected text
C-b ] # ==> Paste the text above