Tuesday, October 20, 2020

Disowning a process in Linux

When you want a process to continue running even after you log off a Linux system, you have a couple options.

One of them is to use the disown command. It tells your shell to refrain from sending a HUP (hangup) signal to the process when you log off. So, the process continues running. This can be very handy whenever you start a process and then, for some reason, you can’t stay logged in and wait until it finishes.

The disown command is a shell built-in. This means that you don’t have to install it to use it, but it also means that it won’t be available if you use a shell that doesn’t support it. For those of us using bash and related shells (zsh, ksh etc.), disown should be available and you can verify this with a command like this that lists shell built-ins and then looks for "disown":

To read this article in full, please click here


Thanks to Sandra Henry-Stocker (see source)

No comments:

Post a Comment