• 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

daemon: command not found

by Deepika

In Linux, the daemon command is used to start a program as a daemon process, which is a background process that is detached from the terminal and runs independently of the user’s session. Daemon processes are typically used for long-running tasks or services that need to run continuously in the background.

For example, to run a command as a daemon, you could use the following command:

# daemon --name="name" command

This will start the command as a daemon process. The daemon command will fork the process and then exit, leaving the daemon process running in the background.

It is important to note that the daemon command is not a built-in shell command, but rather a separate utility that is typically installed as part of the daemon package. This package is usually available in the default repositories of most Linux distributions and can be installed using the package manager.

If you encounter the below error while running the command daemon:

daemon: command not found

you may try installing the below package as per your choice of distribution:

Distribution Command
Debian apt-get install daemon
Ubuntu apt-get install daemon
Kali Linux apt-get install daemon
OS X brew install daemon
Raspbian apt-get install daemon

daemon Command Examples

1. Run a command as a daemon:

# daemon --name="name" command

2. Run a command as a daemon which will restart if the command crashes:

# daemon --name="name" --respawn command

3. Run a command as a daemon which will restart if it crashes, with two attempts every 10 seconds:

# daemon --name="name" --respawn --attempts=2 --delay=10 command

4. Run a command as a daemon, writing logs to a specific file:

# daemon --name="name" --errlog=path/to/file.log command

5. Kill a daemon (SIGTERM):

# daemon --name="name" --stop

6. List daemons:

# daemon --list

Filed Under: Linux

Some more articles you might also be interested in …

  1. glab Command Examples
  2. strace: command not found
  3. gml2gv Command Examples
  4. ex: Command-line text editor
  5. “hg push” Command Examples
  6. kdeconnect-cli Command Examples
  7. notify-send Command Examples in Linux
  8. autorandr Command Examples in Linux
  9. “gitlab-ctl” Command Examples
  10. astyle: Source code indenter, formatter, and beautifier for the C, C++, C# and Java programming languages

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