Disowning a process

Begone, child!

2014-02-24

…for those times where a process has besmirched your honor so badly that you want nothing to do with it ever again.

Picked up this tip a few weeks ago and it’s been super useful so far.
Let’s say that you start a process (typically a GUI process) from your terminal emulator. All is well and good.
Suddenly, you have a need to type in some terminal commands at the same time you’re running this program. Being a good and competent Linux user, you simply issue the keyboard command to send the ‘suspend’ signal and then send the program to the background. No problems there.
What if you then decide that you want to run another process/program from the same terminal? (you could start another terminal, but if you’re like me screen real-estate is limited and precious, and tabbed terminals aren’t really your style)
Or, what if you want to close that terminal for whatever reason?

This is where the ‘disown’ command comes in. You can run this command on a process that you sent to the background and it will ‘detatch’ itself from that terminal so that you can do other useful things with it (or close it entirely).

Syntax looks like this:

(command)
ctl-Z
bg
disown

Comments: