Tmux
Introduction¶
tmux is an alternative to screen. They are both terminal
multiplexers which allow to manage multiple terminals within a single
window.
tmux is available within the modules, so you will need to load it
before being able to use it (module load tmux).
| Command | Description |
|---|---|
tmux |
Start a tmux session. |
CTRL+b -> D |
Detach session (exit tmux without killing the terminal) |
tmux ls |
List all the available sessions |
tmux attach -t 0 |
Attach tmux to session 0 |
CTRL+b -> % |
Split the window in two vertical screens |
CTRL+b -> " |
Split the window in two horizontal screens |
CTRL+b -> [UP, DOWN, LEFT, RIGHT] |
Move between screens |
CTRL+b -> x |
Kill current screen |
CTRL+b -> c |
Create a new window |
CTRL+b -> [p, n] |
Move between previous / next window |
CTRL+b -> [0, ..., 9] |
Move between to a given window number |
CTRL+b -> : |
Run a command with tmux (e.g. ls for tmux ls) |
CTRL+b -> ? |
Show all available commands |
CTRL+b -> w |
Open the screen / window navigation panel |
Detaching and reattaching a tmux or screen session¶
On Euler, we use a load balancer to dispatch the users login sessions among 50 login nodes (eu-login-01 to eu-login-50). If you start a tmux or screen session that you would like to detach at some point and reattach to the session at a later stage, then please write down the number of the login node with the session.
Because if you connect again to euler.ethz.ch then your login session
might be dispatched to a different login node. To reattach to a tmux or
screen session, you need to login to the same login node as when you
detached the session.
sshusername@eu-login-XX.euler.ethz.ch
where XX is a number between 01 and 50. Please note that we only allow accessing a particular login node for tmux or screen sessions. In all other cases, you need to login trough the load balancer:
sshusername@euler.ethz.ch
If you are trying to login to a particular login node, there is no guarantee that the node is available, as it could be closed due to reinstallation or other issues (going through euler.ethz.ch, you will always get a session on a login node).