Closed Captioning Closed captioning available on our YouTube channel

How to use the disown command: 2-Minute Linux Tips

Network World | Oct 30, 2020

In this Linux tip, learn how to use the disown command. It provides a way to detach a process you’re running from your login session so that it isn’t killed (hung up on) when you log out. This means that the process can continue running after you log off.

Copyright © 2020 IDG Communications, Inc.

Similar
Hi, this is Sandra Henry-Stocker, author of the “Unix as a Second Language” blog on NetworkWorld.
In this Linux tip, we’re going to look at the disown command. It provides a way to detach a process you’re running from your login session so that it isn’t killed (hung up on) when you log out. This means that the process can continue running after you log off.
The disown command is a built-in that works with shells like bash and zsh. To use it, you type “disown” followed by the process ID (PID) or the process you want to disown. Something like this:
After a process is disowned, it will no longer show up on the list when you type “jobs” and your shell won’t send it a hangup signal when you log off so it will be free to continue running. Here’s an example:
When you log back in, the process will probably have finished. If it’s still running, you can see in your ps output, but it won’t be associated with your current shell or be affected when you logoff again.
That’s your Linux tip for the disown command.
If you have questions or would like to suggest a topic, please add a comment below. And don’t forget to subscribe to the IDG Tech(talk) channel on YouTube.
If you liked this video, please hit the like and share buttons. For more Linux tips, be sure to follow us on Facebook, YouTube and NetworkWorld.com.

Popular
Featured videos from IDG.tv