• A daemon (pronounced: day-mon) is a background process that can perform tasks without user interaction
  • A daemon has not controlling terminal

Identifying a daemon process

  • Daemons usually have a parent process ID (PPID) of 1 i.e, the parent is the init process
  • Daemons aren’t attached to any terminal, thus should have no TTY
# check PPID
$ ps -eo pid,ppid,cmd | grep process-name 
2276 1 /usr/bin/some-daemon-process
 
# check TTY (? in col 2 indicates absence)
$ ps -eo pid,tty,cmd | grep process-name 
2276 ? /usr/bin/some-daemon-process

It’s a general Linux rule that the names of daemons end with the letter "d"


Some Linux daemons

  • udisksd
  • gvfsd
  • systemd
  • logind

When the system boot is complete, the system initialization process starts spawning (creating) daemons through a method called forking, eliminating the need for a terminal (this is what is meant by no controlling terminal).


Refs

  1. https://itsfoss.com/linux-daemons/