How can I reattach to tmux process

You can not re-attach a process id. You need to reattach the corresponding tmux session.

So do tmux ls. Pick whatever session you want to re-attach. Then do tmux attach -d -t <session id> to re-attach it to a new tmux instance and release it from the old one.


If you only have one session detached you can just do

tmux attach

also if you're going to be working in multiple sessions it might be a good idea to name your sessions

tmux new -s ssh-to-staging
Ctrl b, d   # Detach from session
tmux new -s ssh-to-s3
Ctrl b, d   Detach from session

now when you do tmux ls you can reattach more easily without guessing.

tmux attach -d -t ssh-to-s3

You also might wanna bookmark this cheat sheet

Tags:

Tmux