Run systemd with namespace in WSL2. Inspired by subsystemctl
- Launch systemd-enabled shell from start menu
- Support Visual Studio Code(Remote - WSL) extension
- Install package
Download installer from release page, and execute it with root privilege.
curl -LJO https://github.com/lungothrin/bottled-shell/releases/download/v0.1.0-alpha/installer-v0.1.0-alpha.sh
sudo bash installer-v0.1.0-alpha.sh
- Set your login shell to
bottled-shell
Suppose you are using bash
as login shell.
Create an alias for bottled-shell.
sudo ln -s /opt/bottled-shell/bin/bottled-shell /opt/bottled-shell/bin/bottled-bash
Edit /etc/passwd
, set your login shell to bottled-bash
.
username:x:1000:1000::/home/username:/opt/bottled-shell/bin/bottled-bash
- All done.
Try open a shell from start menu, or open a Visual Studio Code(Remote - WSL) window.