Example / Exercise +

Invoking a tmux session

  1. Open your terminal and ssh to login.itd.umich.edu
  2. Note your host, type hostname to confirm.
  3. Start a new tmux session named 506 as follows: tmux new -s 506

Windows

  1. Type echo Window 0
  2. Create a new window using cntrl+b c
  3. Type echo Window 1
  4. Use cntrl+b n and cntrl+b p to navigate between windows.

Panes

  1. Within either window, type echo Pane 0
  2. Create a new horizontal pane using cntrl+b " (i.e. cntrl+b shift+')
  3. Type echo Pane 1
  4. Use cntrl+b [up arrow] and cntrl+b [down arrow] to move between panes.

Swapping layouts

  1. Make directories ~/506/test/1 using mkdir -p $Home/506/test/1
  2. Move to the upper pane, and split into two panes using cntrl+b % (i.e. cntrl+b shift+5)
  3. On the left, change directories to ~/506/test/1. Then type pwd.
  4. On the right, change directories to ~/506/test and type pwd.
  5. In the lower pane, change directories to ~/506 and type pwd.
  6. Use cntrl+b [space] to swap pane layouts.

Detach and Re-Attach a tmux session

  1. Type cntrl+b d to detach from the tmux session.
  2. Type tmux ls to list your tmux sessions.
  3. Type tmux a -t 506 to attach to the 506 session.
  4. Use cntrl+b x (respond y for yes) to kill a single pane.
  5. Type exit to exit the entire window.

You will learn more about tmux by reading Tactical Tmux by Daniel Meissler.