- Windows 11
- WSL 2
- Add inside
/etc/wsl.conf
:
[boot]
systemd = true
sudo vi /etc/wsl.conf
[boot]
systemd = true
# [Optional] Check if the file has been correctly created
cat /etc/wsl.conf
- Terminate distro:
wsl -t [Distro]
- Restart and connect distro:
wsl ~ -d [Distro]
PS C:\Users\1eedaegon> wsl ~ -d rhel8
[lee-rhel@rhel8]~% systemctl status
● rhel8
State: running
Jobs: 0 queued
Failed: 0 units
Since: Sun 2022-11-27 20:05:06 KST; 4s ago
CGroup: /
├─init.scope
│ └─1 /sbin/init
├─system.slice
│ ├─systemd-journald.service
│ │ └─25 /usr/lib/systemd/systemd-journald
│ └─dbus.service
│ └─34 /usr/bin/dbus-daemon --system --address=systemd: --nofo>
└─restricted