Difference between revisions of "Tmux"

From Applied Optics Wiki
Jump to: navigation, search
(Created page with "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 detac...")
 
Line 7: Line 7:
  
 
* Install Tmux <code>sudo apt-get install tmux</code>
 
* Install Tmux <code>sudo apt-get install tmux</code>
* Create a new Tmux session <code>tmux new -s [name of session]</code>
+
* Create a new Tmux session <code>tmux new -s [name of session]</code>, choose a name that makes sense and you can remember
 
* You will then be entered into a tmux session to start processes/work
 
* You will then be entered into a tmux session to start processes/work
 
* To leave the session running enter <code>crtl+b</code> then <code>d</code>
 
* To leave the session running enter <code>crtl+b</code> then <code>d</code>

Revision as of 11:20, 3 December 2018

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]
  • 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 "
  • Split your current terminal horzontally ctrl+b <code>%
  • 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