Network Daemons  «Prev  Next»

Lesson 1

Network Services and Daemons

This module will explore how services are managed under UNIX and what types of services are commonly available. By the end of this module, you will be able to:
  1. Describe the difference between TCP and UDP services
  2. Understand the significance of the /etc/services file and well-known port numbers
  3. Configure the inet daemon, which controls many Internet services
  4. Briefly describe many common services, and use telnet to contact servers directly

What it is daemon?

In multitasking computer operating systems, a daemon[1] is a computer program that runs as a background process, rather than being under the direct control of an interactive user. Historically, daemon names end with the letter d: for example,
  1. syslogd is the daemon that implements the system logging facility and
  2. sshd is a daemon that services incoming SSH connections.
In a Unix environment, the parent process of a daemon is often the init process. A daemon is usually created by a process forking a child process and then immediately exiting, thus causing init to adopt the child process. In addition, a daemon or the operating system typically must perform other operations, such as dissociating the process from any controlling terminal (tty). Such procedures are often implemented in various convenience routines such as daemon in Unix.
Systems often start daemons at boot time and serve the function of responding to network requests, hardware activity, or other programs by performing some task. Daemons can also configure hardware (like udevd on some GNU/Linux systems), run scheduled tasks (like cron), and perform a variety of other tasks.

The Internet Daemon

The internet daemon, inetd (pronounced "i net d"), is started at boot time from an initialization file such as

When it is started, inetd reads its configuration from the /etc/inetd.conf file. This file contains the names of the services that inetd listens for and starts. You can add or delete services by making changes to the inetd.conf file.
An example of a file entry from a Solaris 8 system is:
ftp  stream  tcp6  nowait  root  /usr/sbin/in.ftpd  in.ftpd

Ad TCP/IP Illustration
[1]daemon. A background process usually started at system initialization that runs continuously and performs a function required by other processes. Some daemons are triggered automatically to perform their task; others operate periodically.