-
Notifications
You must be signed in to change notification settings - Fork 2
tmux Quick Reference
tmux is a handy tool for keeping track of independently running terminal instances. The most basic reason why you would want to use this is if you want to logout while a long-running program is still running. You can detach from a session and then reattach later without disrupting running jobs. There are many in-depth tutorials on how to use this tool online. This page is meant to be a quick reference page for the most basic commands.
tmux ls
tmux new -s NAME
tmux detach
or hit CTRL-b and then d (this can be run to detach from a session even if there is a command running in the foreground).
tmux a -t NAME
tmux kill-session -t NAME
or if you are still attached to the session type exit
.
If you use tmux and SSH agent forwarding, you may find that reattaching to a tmux session after logging out of the server breaks your SSH connections within the session. To fix this, you can run the following (from within the misbehaving tmux session):
eval $(tmux showenv -s SSH_AUTH_SOCK)
or, to keep the fix close at hand create an alias in ~/.bash_aliases
:
alias fixssh='eval $(tmux showenv -s SSH_AUTH_SOCK)'
- Getting Started in the Lab
- Funding Opportunities
- Registering New Computer on Dal Network
- Conferences & Travel
- Setting up a Miniconda Environment
- tmux Quick Reference
- Customizing Matplotlib
- SSH Tunneling to use RStudio Server
- SSH Tunneling to use Jupyter Notebooks