This happened many times.
While the SSH active, I'm so tired and just close the terminal without
Is it dangerous to doing like that?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
Not at all. When the terminal process exits, the client processes within will also die, and when this happens, the connection to the remote server will be closed by the operating system. The server will see the connection close, and terminate the processes on the server.
However, it is possible that you might end up with lingering processes on the server if they were backgrounded and ignore certain signals.
This may not be true. If bash is running a loop, it can ignore SIGHUP and continue the session. I'm currently trying to work out why this happens.
Also, the shutdown process is noted very well here but apparently Systemd has changed some behaviours.