Home > Computer Tutorials > Computer Knowledge > How to restart WSL using PowerShell, CMD, Task Manager

How to restart WSL using PowerShell, CMD, Task Manager

PHPz
Release: 2024-02-19 16:49:05
forward
991 people have browsed it

WSL or Windows Subsystem for Linux is a built-in feature of Windows 10/11 that allows users to run a Linux environment on Windows systems without the need to dual-boot or use a virtual machine. Restarting WSL is a convenient and efficient way to reboot or reinitialize a Linux instance without restarting the entire system. This article will focus on how to restart WSL through Windows PowerShell, Command Prompt (CMD) and Task Manager.

How to restart WSL using PowerShell, CMD, Task Manager

How to restart WSL using PowerShell, CMD, Task Manager

You can use any of the following methods to restart WSL on Windows.

  • WSL Command
  • Restart a specific Linux distribution
  • Service via LxssManager
  • Use CMD to restart WSL
  • Restart WSL from Task Manager
  • Please make sure to save your work on whatever distribution you are using because when you restart the WSL service it will shut down.

    1]WSL command

    To restart WSL from Windows PowerShell, we use the WSL command with appropriate options. It is a Windows executable command that interacts with the WSL distribution.

    • After clicking the search icon on the desktop, type PowerShell.
    • At the PowerShell prompt, type the following command and press Enter:
    WSL-关闭
    Copy after login
    • You can start WSL again by clicking the application icon on the desktop or searching for it in the Start menu.

    WSL-Shutdown will terminate all active WSL distributions or instances currently running on the physical system or device. Multiple WSL distributions can be installed on the computer, such as Ubuntu, Debian, Kali, etc., and all of these distributions can be shut down and restarted simultaneously through the above steps.

    The above is the detailed content of How to restart WSL using PowerShell, CMD, Task Manager. For more information, please follow other related articles on the PHP Chinese website!

    Related labels:
    source:mryunwei.com
    Statement of this Website
    The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
    Popular Tutorials
    More>
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template