mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-07 03:15:56 +00:00
26 lines
974 B
Markdown
26 lines
974 B
Markdown
# ✅ systemd — Enable
|
|
|
|
This directory contains platform-specific scripts for enabling systemd in environments where it is not active by default.
|
|
For the canonical Make target index that invokes these helpers, see [docs/contributing/tools/makefile.md](../../../../docs/contributing/tools/makefile.md).
|
|
|
|
---
|
|
|
|
## 📄 Scripts
|
|
|
|
### 🪟 `wsl2.sh`
|
|
|
|
Enables systemd as the WSL2 init system by writing `systemd=true` into `/etc/wsl.conf`.
|
|
|
|
- Silently exits if not running on WSL2
|
|
- Silently exits if systemd is already running (`/run/systemd/system` exists)
|
|
- If systemd is configured but not yet active, prints instructions to restart WSL2
|
|
- If systemd is not configured at all, appends the `[boot]` section to `/etc/wsl.conf` and triggers `wsl --shutdown` to apply the change
|
|
|
|
> ⚠️ After this script runs, WSL2 must be fully restarted before systemd-dependent steps (DNS, AppArmor, etc.) will work.
|
|
|
|
---
|
|
|
|
## 🔗 Related
|
|
|
|
- [`../`](../) — systemd administration scripts
|