Skip to content

Instantly share code, notes, and snippets.

@Joshuliu
Created April 11, 2018 02:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Joshuliu/8a40c8ee122ad1a94920ad2a200eac69 to your computer and use it in GitHub Desktop.
Save Joshuliu/8a40c8ee122ad1a94920ad2a200eac69 to your computer and use it in GitHub Desktop.

Tmux Guide

Tmux is useful in VPSes because it allows scripts and programs to run 24/7, even when you're disconnected from the VPS. You can have multiple sessions running different scripts simutaneously.

Create a new tmux Session:

tmux new -s SessionName

Attach to a Session

tmux a -t SessionName

or to connect to the last connected session...

tmux a

Dettach from a Session:

Hit ctrl + b, then hit d

Kill a tmux Session:

tmux kill-ses -t SessionName

or if you're already in a session...

tmux kill-ses

List tmux sessions:

tmux ls
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment