So, say I get disconnected from an SSH-session after I’ve started
cp or any other command that can be long running. Does that command keep running until it’s finished after I get disconnected or does it just get killed?
Always wondered this.
No, any programs still attached to the terminal, and not placed into the background with something like
nohup, would be killed.
This is why there are virtual terminal solutions like
tmux and the older
screen which create sessions which continue running even if you are disconnected, and to which you can reattach later.
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.