So I have a script that I would like to run on my server and not have it bother me. So I thought I would run the server in a tmux window and then detach
it so I could simply attach
if I ever want to look at the progress (this script will take days to run).
but when I run my script in the tmux window, I am not able to detatch
while it is running. Is there something I am doing wrong? How can I detach while this still runs? I feel like I am being very oblivious to an obvious solution here.
To detach from a session you invoke the shortcut (ctrl-b)—followed by d , for detatch, or by typing detach explicitly.
First press CTRL + b the press d . This detaches your session. You then press CTRL + d to log out of ssh. Your detached session still keeps running on the server.
Basic Tmux UsageUse the key sequence Ctrl-b + d to detach from the session. Reattach to the Tmux session by typing tmux attach-session -t my_session .
You can detach from a tmux
session while leaving the script running by:
CTRL
+ b
, then pressing d
You can enter back into the session by running tmux attach -t <session id>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With