An important part of preparing an operating-system
declaration is
listing system services and their configuration (see 使用配置系统). System services are typically daemons launched when
the system boots, or other actions needed at that time—e.g., configuring
network access.
Guix has a broad definition of “service” (see 合成服务),
but many services are managed by the GNU Shepherd (see Shepherd服务). On a running system, the herd
command allows you to
list the available services, show their status, start and stop them, or do
other specific operations (see Jump Start in The GNU Shepherd
Manual). For example:
# herd status
The above command, run as root
, lists the currently defined
services. The herd doc
command shows a synopsis of the given
service and its associated actions:
# herd doc nscd Run libc's name service cache daemon (nscd). # herd doc nscd action invalidate invalidate: Invalidate the given cache--e.g., 'hosts' for host name lookups.
The start
, stop
, and restart
sub-commands have
the effect you would expect. For instance, the commands below stop the nscd
service and restart the Xorg display server:
# herd stop nscd Service nscd has been stopped. # herd restart xorg-server Service xorg-server has been stopped. Service xorg-server has been started.
For some services, herd configuration
returns the name of the
service’s configuration file, which can be handy to inspect its
configuration:
# herd configuration sshd /gnu/store/…-sshd_config
The following sections document the available services, starting with the
core services, that may be used in an operating-system
declaration.
• 基础服务 | 必要的系统服务。 | |
• 执行计划任务 | mcron服务。 | |
• 日志轮替 | rottlog服务。 | |
• Networking Setup | 配置网络接口。 | |
• 网络服务 | 防火墙,SSH后台进程等。 | |
• Unattended Upgrades | Automated system upgrades. | |
• X窗口 | 图形显示器。 | |
• 打印服务 | 本地和远程打印机的支持。 | |
• 桌面服务 | D-Bus和桌面服务。 | |
• 声音服务 | ALSA和Pulseaudio服务。 | |
• 数据库服务 | SQL数据库,键值仓库等。 | |
• 邮件服务 | IMAP,POP3,SMTP等。 | |
• 消息服务 | 消息服务。 | |
• 电话服务 | 电话服务。 | |
• File-Sharing Services | File-sharing services. | |
• 监控服务 | 监控服务。 | |
• Kerberos服务 | Kerberos服务。 | |
• LDAP Services | LDAP services. | |
• Web服务 | Web服务。 | |
• 证书服务 | Let’s Encrypt TLS证书。 | |
• DNS服务 | DNS后台进程。 | |
• VNC Services | VNC daemons. | |
• VPN服务 | VPN后台进程。 | |
• 网络文件系统 | 网络文件系统相关的服务。 | |
• Samba Services | Samba services. | |
• 持续集成 | Cuirass and Laminar services. | |
• 电源管理服务 | 延长电池寿命。 | |
• 音频服务 | MPD。 | |
• 虚拟化服务 | 虚拟化服务。 | |
• 版本控制服务 | 远程访问Git仓库。 | |
• 游戏服务 | 游戏服务器。 | |
• PAM Mount Service | Service to mount volumes when logging in. | |
• Guix Services | Services relating specifically to Guix. | |
• Linux Services | Services tied to the Linux kernel. | |
• Hurd Services | Services specific for a Hurd System. | |
• 其它各种服务 | 其它服务。 |