1

On a Guix System the PID 1 is called Shepherd and is controlled using the command herd. I often find myself wanting to tab-complete commands beginning with herd, like:

$ sudo herd restart some<tab>

But lacking that, I can't even find a way to list all services known to (the) Shepherd. The help printout reads:

└$ sudo herd --help
herd [OPTIONS...] ACTION SERVICE [ARG...]
Apply ACTION (start, stop, status, etc.) on \
SERVICE with the ARGs.
  -s, --socket=FILE           send commands to FILE
      --help                  display this help and exit
      --usage                 display short usage message and exit
      --version               display version information and exit

and only seems to mention actions that should be taken on services. The info and man pages are both terse, merely listing the available actions.

     herd [OPTION...] ACTION [SERVICE [ARG...]]

   It causes the ACTION of the SERVICE to be invoked.  When SERVICE is
omitted and ACTION is ‘status’ or ‘detailed-status’, the ‘root’ service
is used(1) (*note The root and unknown services::, for more information
on the ‘root’ service.)

   For each action, you should pass the appropriate ARGs.  Actions that
are available for every service are ‘start’, ‘stop’, ‘restart’,
‘status’, ‘enable’, ‘disable’, and ‘doc’.
GAD3R
  • 63,407
  • 31
  • 131
  • 192
Rovanion
  • 921
  • 1
  • 7
  • 17

1 Answers1

3

Turns out there is an undocumented usage of the status action. At least undocumented in terms of never being explicitly mentioned. Given no arguments herd status will list all services known to it, like:

$ sudo herd status
Started:
 + avahi-daemon
 + console-font-tty1
 + console-font-tty2
...
Rovanion
  • 921
  • 1
  • 7
  • 17