WSL Blog

Restarting WSL Linux Distributions

While using Windows Subsystem for Linux (WSL), you may need to restart your WSL Linux distribution to make changes to the WSL config, or due to another random issues. To do this, we can simply run the wsl --shutdown -d <distro-name> command, which we will demo below in this post.

As from WSL Version 0.67.6, released September 2022 we are able to use systemd, which means we can easily reboot a WSL distro from the Linux terminal command session.

Rebooting a WSL Linux Distro

To restart an installed WSL Linux distribution, list your installed WSL distros, then perform the WSL restart using the Linux distro name returned from the list command.

# Check installed WSL distros
wsl -l -v

# Reboot WSL distro
wsl --shutdown -d Ubuntu-20.04
WSL Reboot

To start up a WSL distro, we just need to open a new Terminal for that Distro, or run ‘wsl -d kali-linux‘ using the distro name returned from the list command.

Note: The LXSS Manager Service serves as the broker to the Linux subsystem driver. You can also try restart this, but a reboot of your local machine might be what you need to try before continuing to troubleshoot further.

For more information on troubleshooting WSL issues and rebooting, have a look at MS Docs: Troubleshooting Windows Subsystem for Linux

One response to “Restarting WSL Linux Distributions”

  1. […] the above steps are done, you may need to reboot WSL for systemd to be […]

Leave a Reply

Your email address will not be published. Required fields are marked *