From Deep Learning Course Wiki
Jump to: navigation, search

tmux allows you to create multiple tabs and panes within a single terminal window. It can also keep programs running after you disconnect (e.g. when you ssh into an AWS instance)


  • cygwin Recommend to install the same way `wget` was installed from within cygwin installer as in Jeremy's first lecture of the class.



  • Session - Saved collection of windows and panes and programs you left running inside
  • Attaching - Enter a running session
  • Detaching - Exit a running session (without killing it)
  • Window - Similar to a tab in your browser. Only one window is visible at a time.
  • Pane - Belongs to a window. You can have many of these visible at once.


Here is a list of the most common commands that will get you 90% of the way there.

Outside Tmux

Typically these are run outside, but you can also run them inside an existing session

Start New Session

 tmux new -s myname

Attach To Existing Session

 tmux a -t myname          #by name 
 tmux a 4                  #by number (in this case 4)

List Sessions

 tmux ls

Kill Session

 tmux kill-session -t myname

Show Tmux Commands

 tmux list-keys | less              #press ‘q’ to exit, arrow keys to navigate

Inside Tmux Session

Start each command with CTRL + b, release, then press one of the following:


 %                          vertical split
 "                          horizontal split
 d                          exit (detach) pane   (it keeps running in the background)
 Up/Down/Left/Right         move between panes
 : + resize-pane -D         Resizes the current pane down
 : + resize-pane -U         Resizes the current pane upward
 : + resize-pane -L         Resizes the current pane left
 : + resize-pane -R         Resizes the current pane right
 : + resize-pane -D 20      Resizes the current pane down by 20 cells


 c     create window
 w     list windows     #you can also use this to select windows
 n     next window
 p     previous window
 &     kill window
 ,     rename window