Disown

From LQWiki
Jump to: navigation, search

Disown

Disown is a builtin command in the bash shell to remove the link between jobs and their parent process; allowing them to continue after the parent process is stopped.

Example

You have opened a konsole and called kwrite. You want to close the konsole window, but leave kwrite open. So you send kwrite to the background and disown it:

kwrite

You type <CTRL_Z> to stop the program.

bg
disown

Then you can close the konsole and kwrite stays running.

Options

Disown has three modes of operation:

Plain 'disown' removes the most recent job from your job list (seen by jobs).

'disown -h' allows you to reconnect to the job later by keeping it in your job list.

'disown -ar' disowns all current jobs.