What is a Daemon?

Posted on by Dean Conally
Reading Time: 2 minutes
what-is-a-daemon1

While many know daemons from Greek mythology, we will learn what a daemon is in the world of software. If you ever manually installed software or a service on your server, a daemon runs in the background. This article will discuss what daemons are, the difference between a daemon and a process, the most common daemons, and how to use daemons on CentOS 6 and CentOS 7.

Daemon Meaning

A daemon is a program that runs continuously in the background of a multitasking operating system, meaning that daemons are not under the user’s direct control. A specific action or event activates daemons. Most daemon file names end with the letter d.

While scripts like init or systemd start most daemons when a system boots up, some start manually. Examples of manually triggered daemons are:

Daemon vs Process

As explained above, a daemon is a non-interactive program. It runs all the time, and it’s not connected to the terminal. Even when you close the terminal, the operating system will not stop the daemon as it will run in the background.

On the other hand, a process will stop when the terminal closes because it is an executing program instance.

Most Common Daemons

Using Daemons

There are three simple commands used in most cases when interacting with Daemons, but they are different depending on your CentOS version.

CentOS 7 and Above

If using CentOS 7 and above, use systemctl in your commands.

Starting the daemon.

systemctl start httpd

Stopping the daemon.

systemctl stop httpd

Create a symlink to automatically start the daemon on every boot.

systemctl enable httpd

CentOS 6 or Below

When using CentOS 6 or below, replace systemctl with service and flip where httpd appears in the command.

Starting the daemon.

service httpd start

Stopping the daemon.

service httpd stop
Caution:
The init script does not support creating a symlink by using service httpd enable. To automatically start a daemon on CentOS 6 or below, manually create the symlink.

Conclusion

We hope this article has helped you understand what a daemon is and how it works. Make sure to double-check your CentOS version before interacting with daemons.

Learn more about the solutions at Liquid Web that fit any project, big or small.

About the Author: Dean Conally

I am a Linux enthusiast and console gamer, dog lover, and amateur photographer. I've been working at Liquid Web for a bit less than two years. Always looking for knowledge to expand my expertise, thus tackling new technologies and solutions one day at a time.

Have Some Questions?

Our Sales and Support teams are available 24 hours by phone or e-mail to assist.

1.800.580.4985
1.517.322.0434

Latest Articles

How to Use Material-UI in React

Read Article

Cloning an Existing Virtual Machine with VMware

Read Article

Five Steps to Create a Robots.txt File for Your Website

Read Article

Premium Business Email Pricing FAQ

Read Article

Microsoft Exchange Server Security Update

Read Article