LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

disown

remove jobs from shell job table

TLDR

Disown the most recent background job
$ disown
copy
Disown a specific job by job spec
$ disown %[1]
copy
Disown all background jobs
$ disown -a
copy
Disown running jobs only
$ disown -r
copy
Disown and suppress SIGHUP
$ disown -h %[1]
copy

SYNOPSIS

disown [options] [jobspec...]

DESCRIPTION

disown is a shell builtin that removes jobs from the shell's job table, preventing them from receiving the SIGHUP signal when the shell terminates. This allows background processes to continue running after logout.Without arguments, disown affects the current job. Job specifications (like %1) can target specific jobs. The -h option keeps jobs in the table but marks them to not receive SIGHUP, useful when you want to monitor jobs but prevent termination.disown is commonly used when a long-running process was started without nohup and needs to survive shell exit. It works with both bash and zsh shells.

PARAMETERS

JOBSPEC

Job specification (e.g., %1, %2) to disown.
-a
Disown all jobs.
-r
Disown only running jobs.
-h
Mark jobs so they don't receive SIGHUP on shell exit.

CAVEATS

Process must already be backgrounded before disown. Output may still go to terminal if not redirected. Cannot re-own a disowned job. Shell-specific implementation varies.

HISTORY

disown is a shell builtin found in bash, zsh, and ksh. It complements the nohup command by providing a way to detach already-running jobs from the shell session.

SEE ALSO

nohup(1), bg(1), fg(1), jobs(1)

RESOURCES

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid