Files
nexus/wiki/entities/systemd.md
2026-04-16 21:08:55 +08:00

32 lines
927 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "systemd"
type: entity
tags: [linux, init-system, service-manager]
date: 2026-04-16
---
## Definition
systemd 是 Linux 系统的初始化(init)系统和服务管理器,作为系统的第一个进程(PID 1)运行负责管理系统服务和socket。
## Role
- 系统和服务管理器
- 提供服务启动、停止、重启功能
- 实现 Socket Activation 和其他激活机制
## Key Properties
- PID 1系统首个进程
- 单元文件驱动(.service, .socket, .target
- journald 日志系统
- cgroups 资源管理
## Key Commands
```bash
systemctl start/stop/restart/status <service> # 服务管理
systemctl enable/disable <service> # 开机自启管理
systemctl list-units # 查看单元状态
```
## Connections
- [[systemd]] ← manages ← [[OpenSSH]]
- [[systemd]] ← implements ← [[Socket Activation]]
- [[Ubuntu]] ← ships_with ← [[systemd]]