Tmux

From Applied Optics Wiki
(Redirected from TMux)
Jump to: navigation, search

Tmux is an incredibly simple and useful bit of software that lets you;

  • Tile multiple terminals into one screen
  • Allow you to log in to a running session, which you can detach from (keeping an processes going) and log off.

There are a number of online tutorials for the first point, but below are the basics for the second;

  • Install Tmux sudo apt-get install tmux
  • Create a new Tmux session tmux new -s [name of session], choose a name that makes sense and you can remember
  • You will then be entered into a tmux session to start processes/work
  • To leave the session running enter crtl+b then d
  • You can now log off and the Tmux session processes will continue running
  • To get back onto your Tmux session tmux attach-session -t [name of session] (or tmux attach to go back to the most recent session)
  • If you've forgotten what your session was called, you can list all tmux ls
  • To close the session, enter the session and exit

That's it. If you want be more advanced, these shortcuts will help;

  • Split your current terminal vertically ctrl+b then "
  • Split your current terminal horzontally ctrl+b then %
  • Move between your panes ctrl+b then [arrow key]
  • To resize panes ctrl+b then :, then type resize-pane -[direction] [length] where direction is U,D,L,R (up,down,left,right) and length is in number of lines