nohup
or screen
are the way to go if you haven't started the process yet - the earlier captures the output for you in a file, while the latter is more complex and allows you to resume control of the process in a latter connection (learning GNU Screen is really worth it). If you are already running it and you don't want to quit and restart it, though, you can do the following:
- Suspend the process with
ctrl-Z
- Resume it in the background with
bg
.
- Disown it (detach it from the current shell) with
disown %1
Now the process isn't related to your TTY anymore and you can safely disconnect from the server.