What exactly is a daemon?
Daemon
A daemon is a Unix/Linux program that quietly runs in the background rather than under the direct control of a user. When a specific event or condition or process occurrence that time a daemon gets initiated usually.
These processes can be a result of some other program that is managed by the kernel.
The kernel assigns a unique Process Identification number which stands for PID. Almost all daemons have names that end with the letter "d".
For example, httpd is the daemon that handles the Apache server, or, sshd which handles SSH remote access connections.
Interactive, Batch, and Daemon
In Linux, these processes are divided into 3 types of processes:
Interactive, Batch, and Daemon.
The processes which are run by a user at the command line are called interactive processes.
The processes which are not associated with the command line and are presented from a queue of processes, which are also most convenient for recurring tasks during the time when the system usage is low are called batch processes.
The process which is identified by the system and whose PID is always 'init', is called daemons.
The 'init' is a process that always gets started first at the time when a Linux computer is turned on and it remains on that system until the computer is turned off.
The Process due to which daemons get initiated is forking, making a parent process die when the child process starts performing their normal functions.
Good to remember: A daemon is always a process, but not all processes are a daemon.