Gerard Condon's Blog

Journal of a software developer.

TMUX

What is tmux

  • tmux is a terminal multiplexer.
  • can launch multiple terminals from a single environment - effectively new terminal tabs
  • can divide the window into panes
  • can detach from a session and keep it running in the background

Basic usage

  • PREFIX - this is the tmux prefix. By default this is ctrl-b but you can remap this to an easier key

Outside tmux

  • tmux new -s session_name - create a new session with the given session name
    • pass the -d flag to create this session in the background
  • tmux ls - list the running sessions
    • if there are no running sessions then you will see this error failed to connect to server: Connection refused
  • tmux attach - if there is only one session running then attach to it
  • tmux attach -t session_name - attach to a specified session
  • tmux kill-session -t session_name - kill the session specifed by the session name

Inside tmux

  • PREFIX d - detach from a session

  • exit - exits tmux and kills session

Resources

INVS

Tmux & VIM

  • https://teamgaslight.com/blog/vim-plus-tmux-a-perfect-match
  • http://tilvim.com/2014/07/30/tmux-and-vim.html
  • http://meirkriheli.com/talks/tmux-vim/#/
  • https://github.com/tmuxinator/tmuxinator