Skip to content

Instantly share code, notes, and snippets.

@hackjutsu
Created November 30, 2025 20:34
Show Gist options
  • Select an option

  • Save hackjutsu/540f0d97bdbb68d761cf3176981b6c58 to your computer and use it in GitHub Desktop.

Select an option

Save hackjutsu/540f0d97bdbb68d761cf3176981b6c58 to your computer and use it in GitHub Desktop.
[tmux snippets] useful #tmux snippets
# start a new session
tmux new -s mysession
# detach (leave it running in background)
Ctrl+b d
# start a program in a new tmux
tmux new -s <session> -d '<command to execute in shell>'
tmux new -s mysession -d 'uvicorn app.main:app --host 0.0.0.0 --port 8000'
# list existing tmux sessions
tmux ls
# reattach to a session
tmux attach -t mysession
# kill a tmux session
tmux kill-session -t mysession
# kill all sessions
tmux kill-server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment