Review: Complete tmux Tutorial Video (12min)

This is a good, relatively quick coverage of how to start using tmux for sessions, windows, and panes.

Commands

These are the commands reference in the video

Create a new session    |  `tmux``
-------------------------------------------------------------------------
Detach                  |  `LEADER-d``
-------------------------------------------------------------------------
Get available sessions  |  `tmux ls``
-------------------------------------------------------------------------
Reattatch               |  `tmux attach -t NAME``
-------------------------------------------------------------------------
Give/Rename a session   |  `tmux rename-session -t OLDNAME NEWNAME``
-------------------------------------------------------------------------
Kill a session          |  `tmux kill-session -t NAME``
-------------------------------------------------------------------------
Create a new window     |  `LEADER-c``
-------------------------------------------------------------------------
Switch windows          |  `LEADER-number``
-------------------------------------------------------------------------
Split vertically        |  `LEADER-%``
-------------------------------------------------------------------------
Split horizontally      |  `LEADER-|``
-------------------------------------------------------------------------
Switch panes            |  `LEADER-arrowkey``
-------------------------------------------------------------------------
Rename a window         |  `LEADER-,`
-------------------------------------------------------------------------

Notes

Notes
  • Tmux lets you make a virtual session where you can start a command line app. You can detach from the session and the command will keep running. When you reattach to the session it shows up again

  • `LEADER`` defaults to CTRL-b but can be changed in `~/.tmux.conf``

  • The `-t`` stands for "target" which makes it easier for me to remember

  • The NAME is the first thing on `tmux ls` line before the colon. For example, "website" in "_website: 1 windows (created...)__"

  • Session NAMEs start life as an index number (starting at zero) until assigned a name. (e.g. this session "NAME" is "0": "_0: 1 windows (created...)__"

  • The status bar is at the bottom of the terminal

  • The status bar show the lists of windows

  • An * identifies the active window in the status bar

  • A tmux session can have multiple windows which take up the full size of the terminal

  • Panes divide a single window into multiple smaller sections

  • One window is created by default when you start a session

  • Creating a session with a name (instead of just an index reference) is done with `tmux new -s NAME``. I've been doing that but it's hard to remember. I'm liking the patter of starting an unamed session with bare `tmux`` and then renaming