A Linux system, as any UNIX system, has quite a few daemons hanging around, doing nice little things for you. This section will try to explain what a daemon is.
What's a daemon
?
A daemon is a program executing
in the background, doing a specific task, usually something important for
the system. They are most often started at system boot, and stopped at
system halt, running all the time the system is up. Normally, they don't
interact directly with the user, instead you tell them how to behave with
a configuration file. They are most often well written, so they won't consume
much CPU power when they are just waiting for something to happend.
What daemons are
there ?
I'll describe some of the most
common daemons, in no particular order.
inetd
The "internet super server" is
one of the most common daemons. At startup, it reads it configuration file
/etc/inetd.conf and then starts listening for incoming internet connections.
When someone tries to access your system with, as an example, the telnet
protocol, inetd checks it's configuration to see what to do if a telnet
request comes, and executes the correct program.
crond
Crond is a very useful daemon,
making it possible to execute things at a specified time, or at an interval.
You submit a configuration file to it, and every minute it wakes up from
it's CPU friendly sleep, and checks if something should be done right this
minute. Really useful, if you ask me.
syslogd
This daemon takes care of logging
information from various programs, and stores them to the correct place.
It's configuration file, /etc/syslog.conf, makes it possible to have logs
from pppd in one file, and logs from sendmail in another. It's also possible
to have the log on a VT, or even on another machine via TCP/IP.
klogd
Takes care of messages from the
kernel.
atd
A daemon waking up every minute
to see if something should be done at that time. Kind of similar to crond,
but a job submitted to atd (with the command at) is only executed once,
while a job maintained by cron is executed periodically.
rpc.portmap
This daemon acts a little like
inetd for SUN RPC calls such as NFS. Sounded like greek ? Read the nfs
man page :-)
sshd, httpd, nntpd..
These are various internet services,
such as secure shell, http (web), nntp (news) running as separate daemons
instead of being started by inetd. This makes them a bit faster, but they
consume more memory/CPU.
gmp
See the section called Using
your mouse - gpm, but basically handling your mouse in consolemode.
xdm
Handling X server, remote or
local. If you have a fancy login prompt in X, this is the daemon handling
that.
xntpd
Synchronising your time with
a distant time server, keeping your clock within milliseconds to world
time. This is very important in environments where you share files via
NFS.