In Linux, what's the difference in a service and a daemon? I know a daemon is a long running process without a terminal, meant for servicing things such as requests from other processes or server type services such as a web server or dns server.

I understand that you can change the runlevel, and modify the different things which get executed at each runlevel.

However, service doesn't make sense. In the Windows sense of a service, it's almost the same thing as a daemon in Linux. In Linux, what role does a service fill that a daemon does not?

It also seems like you can control daemons using the service command.

Service is the command that calls the scripts from /etc/init.d which control the daemon processes. Many people use the terms service and daemon to refer to the same thing however the true name is daemon.

A daemon is a computer program that runs as a background process, rather than being under the direct control of an interactive user. Traditionally daemon names end with the letter d. For example, syslogd is the daemon that implements the system logging facility, and sshd is a daemon that services incoming SSH connections.

The term was coined by the programmers of MIT's Project MAC. They took the name from Maxwell's demon, an imaginary being from a thought experiment that constantly works in the background, sorting molecules. Unix systems inherited this terminology. Maxwell's Demon is consistent with Greek mythology's interpretation of a daemon as a supernatural being working in the background, with no particular bias towards good or evil.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.