Wandering Journey

Jounaling the travel from one subject to another, often with no definite destination or purpose...

Reboot Windows Subsystem for Linux

We need a different method to restart the Windows Subsystem for Linux LxssManager service

Summary

The Windows Subsystem for Linux environment apps such as Ubuntu, Debian, OpenSuse, and Kali do not support the Systemd that provides fundamental building blocks for a Linux operating system. We are not able to reboot or use the systemctl commands to manage the systemd services.

Let’s explore different methods to restart the LxssManager service.

Methods

Method 1

Launch an elevated PowerShell prompt: 1

Get-Service LxssManager | Restart-Service

Attempting to launch from a standard prompt will result in the following error:

Restart-Service : Service 'LxssManager (LxssManager)' cannot be stopped due to the following error: Cannot open
LxssManager service on computer '.'.
At line:1 char:27
+ Get-Service LxssManager | Restart-Service
+                           ~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (System.ServiceProcess.ServiceController:ServiceController) [Restart-Service
   ], ServiceCommandException
    + FullyQualifiedErrorId : CouldNotStopService,Microsoft.PowerShell.Commands.RestartServiceCommand

Method-2

Using the Services consoles is perhaps the simplest method to stop, start, disable, or enable one or multiple services on Windows 10.

Stop service

To stop a running service using Services, use these steps:

  1. Open The Markdown elements outlined in John Gruber’s design documentStart.
  2. Search for Services and click the top result to open the console.
  3. Double-click the service that you intend to stop.
  4. Click the Stop button.

Insert Services Image

Quick tip: You can also manage the state by right-clicking the service and selecting the option. Or you can select the service and then use the controls at the top to start, stop, pause, or restart.

  1. Click the Apply button.
  2. Click the OK button.

Once you complete the steps, the service will stop running on the device.

If you’re unable to stop a system service, consider that some services are required for the operation of Windows 10, and they can’t be stopped.

Start service

To start a service on Windows 10, use these steps:

  1. Open Start.
  2. Search for Services and click the top result to open the console.
  3. Double-click the service that you intend to stop.
  4. Click the Start button.

Insert Services Image

  1. Click the Apply button.
  2. Click the OK button.

After you complete the steps, the service you specified will start for the current session.

Method-3

Method-4

  1. Note: This works on Windows systems with Windows PowerShell (5.1) and/or PowerShell (7.1).