microsoft / microsoft/WSL

WSL needs a reboot capability

Open
#12,417 6 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
C++
Stars
33.7k
Forks
1.8k
Avg merge
3d 17h
Merged PRs (30d)
116

Description

Linux provides the /usr/sbin/reboot command. This allows one to restart the system without having to go to do a power cycle. Windows also has this capability. If you are running a daily system update (of the Linux system - say Ubuntu), It will give you a signal file: /var/run/needrestart if one is needed. Currently the only way to do this is to do a wsl.exe --shutdown. However, you have no way to actually restart the system without going back the to the Windows cmd or powershell and running wsl, This makes it very hard to automatically restart wsl.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing wsl.exe --shutdown behavior and how Linux commands such as /usr/sbin/reboot are handled. Consider the /var/run/needrestart signal and the Windows cmd or PowerShell boundary. Done means a Linux-side reboot request can restart WSL without requiring a separate Windows command.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, linux, powershell, ubuntu
Domain
cli, operating-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.