How to Restart a Daemon

It depends on the daemon :-). A lot of daemons can be told to re-read their configuration files or do other things like that by sending them certain signals. Quite of a HUP signal is used for. For example, inetd will re-read inetd.conf when sent a HUP signal, so you could do this:

killall -HUP inetd

[ Note: Do *NOT* do this on Solaris. Killall means something entirely different there ;-). ]

Alternatively, if you have a system with a standard SysV init (most distributions aside from Slackware do), you can simply use the init script do your work for you. In the simplest form,

/etc/rc.d/init.d/inetd stop
/etc/rc.d/init.d/inetd start

will do the trick. (Some distributions, such as Debian, just call it /etc/init.d.) Even handier,

/etc/rc.d/init.d/inetd restart

will generally do this for you. However, it's often considered crude to kill and restart the daemon when simply sending it a signal would do the trick :-). (Although, less crude than rebooting the whole system.) So, many init scripts (such as most of the ones bundled with a Red Hat system) support yet another command:

/etc/rc.d/init.d/inetd reload

This will generally send whatever signal is required to get the daemon to re-read its config file.