This manual documents the GNU Daemon Shepherd, or GNU Shepherd for short. The Shepherd looks after system services, typically daemons. It is used to start and stop them in a reliable fashion. For instance, it will dynamically determine and start any other services that our desired service depends upon.
The Shepherd is the init system of the GNU operating system—it is the
first user process that gets started, typically with PID 1, and runs
as root
. Normally the purpose of init systems is to manage all
system-wide services, but the Shepherd can also be a useful tool assisting
unprivileged users in the management of their own daemons.
Flexible software requires some time to master and
the Shepherd is no different. But don’t worry: this manual should allow you to
get started quickly. Its first chapter is designed as a practical
introduction to the Shepherd and should be all you need for everyday use
(see Jump Start). In chapter two we will describe the
herd
and shepherd
programs, and their relationship, in
more detail (herd
and shepherd
). Subsequent chapters provide a full
reference manual and plenty of examples, covering all of Shepherd’s
capabilities. Finally, the last chapter provides information for
those souls brave enough to hack the Shepherd itself.
The Shepherd was formerly known as “dmd”, which stands for Daemon Managing Daemons (or Daemons-Managing Daemon?).
This program is written in Guile Scheme. Guile is also the Shepherd’s configuration language. See Introduction in GNU Guile Reference Manual, for an introduction to Guile. We have tried to make the Shepherd’s basic features as accessible as possible—you should be able to use these even if you do not know how to program in Scheme. A basic grasp of Guile is required only if you wish to make use of the Shepherd’s more advanced features.