• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

disown Command Examples in Linux

by admin

The “disown” command in Linux is used to remove a running or backgrounded job from the shell’s control. This means that the job will continue to run even after the user logs out of the system or closes the terminal window.

The basic syntax of the command is:

# disown [-h] [-ar] [jobspec ...]

where:

-h: causes the job to be not listed by the jobs command.
-a: causes all jobs to be disowned.
-r: causes all running jobs to be disowned.
jobspec: specifies the job to be disowned. If no job specification is provided, the current job is used.

For example, to disown the current background job the command would be “disown %1011” where 1011 is the job number.

disown Command Examples

1. Disown the current job:

# disown

2. Disown a specific job:

# disown %job_number

3. Disown all jobs:

# disown -a

4. Keep job (do not disown it), but mark it so that no future SIGHUP is received on shell exit:

# disown -h %job_number

Filed Under: Linux

Some more articles you might also be interested in …

  1. jp2a Command Examples
  2. i3-scrot Command Examples in Linux
  3. getent Command Examples in Linux
  4. –force V/s –nodeps : rpm command options to install or uninstall a package
  5. deno: A secure runtime for JavaScript and TypeScript
  6. dconf Command Examples (Cheat Sheet)
  7. gh workflow: List, view, and run GitHub Actions workflows
  8. dvc fetch: Download DVC tracked files and directories from a remote repository
  9. “git verify-commit” Command Examples
  10. git lfs: Work with large files in Git repositories

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright