Skip to content

Instantly share code, notes, and snippets.

@kevin-miles
Created November 14, 2014 22:32
Show Gist options
  • Save kevin-miles/80ce9b6b041bef0d3bfe to your computer and use it in GitHub Desktop.
Save kevin-miles/80ce9b6b041bef0d3bfe to your computer and use it in GitHub Desktop.
How to use tmux
As screen is not maintained anymore you should look for modern alternatives like tmux.
tmux is superior for many reasons, here are just some examples:
Windows can be moved between session and even linked to multiple sessions
Windows can be split horizontally and vertically into panes
Support for UTF-8 and 256 colour terminals
Sessions can be controlled from the shell without the need to enter a session
Basic Functionality
To get the same functionality as explained in the post with the most votes you would need to do the following:
ssh into the remote machine
start tmux by typing tmux into the shell
start the process you want inside the started tmux session
leave/detach the tmux session by typing Ctrl-B and then D
You can now safely logoff from the remote machine, your process will keep running inside tmux. When you come back again and want to check the status of your process you can use tmux attach to attach to your tmux session.
If you want to have multiple session running side-by-side you should name each session using Ctrl-B and $. You can get a list of the currently running sessions using tmux list-sessions.
tmux can do much more advanced things then handle a single window in a single session. For more information have a look in man tmux or http://tmux.sourceforge.net/. A FAQ about the main differences between screen and tmux is available here.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment