Skip to content

Latest commit

 

History

History
70 lines (39 loc) · 1.76 KB

Tips.Windows.WSL.md

File metadata and controls

70 lines (39 loc) · 1.76 KB

Windows Subsystem Linux (WSL)

References

Enable WSL

  • Enable-WindowsOptionalFeature -Online -FeatureName $("VirtualMachinePlatform", "Microsoft-Windows-Subsystem-Linux")

Install WSL2 Linux Kernel

WSL Commands

  • https://learn.microsoft.com/en-us/windows/wsl/basic-commands

  • whoami

  • WSL Versions / Status:

    • wsl -l -v
    • wsl --list --online
    • wsl --version
    • wsl --status
  • WSL Update:

    • wsl --update
  • List available distributions:

    • wsl --list --online
    • wsl -l -o
  • Run a specific Linux distribution from PowerShell or CMD:

    • wsl --distribution <Distribution Name> --user <User Name>
  • Change directory to home:

    • wsl ~
  • Mount a disk or device:

    • wsl --mount <DiskPath>
  • Unmount disks:

    • wsl --unmount <DiskPath>
  • Shutdown:

    • wsl --shutdown
  • Terminate:

    • wsl --terminate <Distribution Name>
  • Unregister or uninstall a Linux distribution:

    • wsl --unregister <DistributionName>