User Tools

Site Tools


wiki:install_windows_subsystem_linux_wsl_virtualbox

Install Windows Subsystem for Linux (WSL) in Virtualbox

This is WSL version 1. Virtualbox 7 doesn't support Hyper-V guest virtualization, which is necessary for WSL 2.

Copied from virtualbox forums. Works for Ubuntu host machine as well.

Steps

To install WSL1 in Windows 11 (latest version) do as follows:

Set VirtualBox settings to: System

– Processor

—– [x] Enable Nexted VT-x/AMD-V

– Acceleration

—– Paravirtualization Interface: Default

—– Hardware Virtualization: [x] Enable Nested Paging

Make sure Hyper-V is disabled on your host Windows 11 OS (Turn windows features on/off, deselect Hyper-V and restart your PC if you changed this setting).

Now start your Windows 11 VirtualBox VM and open a powershell window as admin once booted into the Windows 11 desktop. Now, instead of executing “wsl –install” (which will install WSL2), execute:

dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart

This will install WSL1. After that, restart your VM.

When the VM is booted and back at the desktop, open a Powershell window as admin again and execute the following commands:

wsl --set-default-version 1
wsl --install -d ubuntu

After the quick install, the Ubuntu window will open with “Installing, this may take a few minutes…”. Once done you will have WSL1 with Ubuntu running inside your Windows 11 VirtualBox VM running on your Windows 11 Host.

PS. If the window telling you “Installing, this may take a few minutes…” stays there for longer than say 30 minutes, just start Ubuntu from the Start menu. It did stay very long for me, but apparently Ubuntu was already long installed.

Tested on

  • Ubuntu 22.04
  • Virtualbox 7
  • WSL 1

See also

References

wiki/install_windows_subsystem_linux_wsl_virtualbox.txt · Last modified: 2024/12/17 14:23 by antisa

Except where otherwise noted, content on this wiki is licensed under the following license: CC0 1.0 Universal
CC0 1.0 Universal Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki