(Shep)herdで利用可能なすべてのサービスの一覧表示

(Shep)herdで利用可能なすべてのサービスの一覧表示

Guixシステムでは、PID 1はShepherdと呼ばれ、コマンドを使用して制御されますherd。次のコマンドをタップして完了したいことがよくありますherd

$ sudo herd restart some<tab>

しかし、これがなければ、羊飼いに知られているすべてのサービスを一覧表示する方法さえ見つかりません。ヘルプ出力は次のとおりです。

└$ 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

そして、サービスについて取るべき措置についてのみ言及しているようです。情報とマニュアルページは簡潔で、利用可能なタスクのみを一覧表示します。

     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’.

ベストアンサー1

これには文書化されていない用途があることがわかりましたstatus。少なくとも記録には​​なく、明示的に言及されたこともありません。引数がないと、herd status認識されたすべてのサービスが一覧表示されます。例:

$ sudo herd status
Started:
 + avahi-daemon
 + console-font-tty1
 + console-font-tty2
...

おすすめ記事