Notes
1.0.0
1.0.0
  • Introduction
  • Commands
    • cd
    • df
    • du
    • fc-cahe
    • ifconfig
    • ip
    • ls
    • lsb_release
    • mkdir
    • mksquashfs
    • mount
    • ping
    • pwd
    • rm
    • sar
    • sudo
  • Linux C
    • Preprocessor
    • Keywords
    • Kernel
      • Ftrace
      • Watchdog
  • Python
    • general
      • Decorator
      • Generator
      • Iterator
      • Lambda
    • Download
    • NIC
  • Network
    • Protocol
      • Link layer
      • IP
      • ARP
      • ICMP
    • Proxy
      • Cntlm
      • Proxychains4
      • ShadowSocks
    • Tools
      • iperf
      • tc
      • Wireshark
    • Apps
      • samba
      • tftp
  • Software
    • Atom
    • Chrome
    • Docker
    • Git
    • Gitbook
    • Hexo
    • Nodejs
    • Teraterm
    • Tex
    • Tmux
    • VIM
    • VSCode
  • Database
    • MongoDB
  • Web
    • CSS
    • LNMP
  • Tools
    • common
    • programming
  • Ubuntu
    • Add user
    • AWS EC2
    • FAQ
    • Installer
    • Shell
    • Shell scripts
    • Themes
    • VPS
  • Windows
    • PowerShell
    • CMD
    • FAQ
  • Aphorisms
  • Book List
  • Favorites
  • Appendix
    • ASCII
    • GSM
Powered by GitBook
On this page
  • Shortcuts
  • commands
  • common config

Was this helpful?

  1. Software

Tmux

Shortcuts

Ctrl-b # prefix

<prefix> ? # help

# session related
<prefix> d # exit current session
<prefix> $ # rename current session
<prefix> s # save current session env, need tmux-continuum support
<prefix> r # restore current session env, need tmux-continuum support

# window related
<prefix> c # add new window
<prefix> % # split window in vertical direction
<prefix> " # split window in horizaontal direction"
<prefix> 0~9 # change to specified window
<prefix> n # change to next window
<prefix> p # change to previous window
<prefix> l # change to last window
<prefix> , # rename current window
<prefix> . # move window
<prefix> w # show and select window
<prefix> Space # use next layout 
<prefix> Ctrl-o # rotate window

# pane related
<prefix> o # change to next pane in current window
<prefix> [hjkl] # change to another pane with directory key
<prefix> x # close current pane, need confirm
<prefix> m # mark pane
<prefix> q # display pane ids of current window
<prefix> z # zone out/in current pane to fullscreen
<prefix> i # show curren pane info
Ctrl-d # close current pane, close window if only one pane in current window

# copy and paste
<prefix> [ # enter scroll mode, start copy with Space key, end with Enter key.
<prefix> ] # paste data

# others
<prefix> : # command line
<prefix> t # show time, quit with 'q'
<prefix> = # select clipboard info

commands

source-file ~/.tmux.conf
resize-pane [-D|-U|-L|-R] size

common config

# Enable mouse
setw -g mouse-resize-pane on
setw -g mouse-select-pane on
setw -g mouse-select-window on
set -g mouse on

# increase scrollback buffer size
set-option -g history-limit 1000000

# Disable auto rename of window
set-option -g allow-rename off

# Set default editor to vi
# set-window-option -g mode-keys vi
setw -g mode-keys vi

# Set colors
set -g default-terminal "screen-256color"

# Restore tmux env
set -g @continuum-save-interval '30'
set -g @continuum-restore 'on'
run-shell ~/.tmux/tmux-resurrect/resurrect.tmux
run-shell ~/.tmux/tmux-continuum/continuum.tmux
PreviousTexNextVIM

Last updated 5 years ago

Was this helpful?