You can install Windows Subsystem for Linux (WSL) on a PC with no internet by preparing the Windows features, WSL installer, and a Linux distribution package on another computer, then transferring them by USB. This guide covers Windows 10 and 11. You will need administrator access, and the other computer must be able to download files. If the offline PC already has WSL enabled and only needs a Linux distribution, skip to the distribution installation steps.
What You’ll Need
- A Windows 10 or 11 PC with a supported 64-bit processor. For the modern WSL installation path, Windows 11 or Windows 10 version 2004 or later (Build 19041 or later) is recommended. On Windows 10, the legacy inbox WSL method may be needed on older builds.
- An administrator account on the offline PC and a restart opportunity.
- Another internet-connected Windows PC, or another computer that can download the required files.
- A USB drive with enough free space for the WSL installer and a Linux distribution package. Use a trusted source, such as Microsoft’s official WSL GitHub releases and distribution publishers’ official pages.
- For manual setup on a supported system: the WSL MSI installer and a distro package, usually an
.appxor.msixbundlefile. A distribution’s official download page may also provide a root filesystem archive, such as a.tarfile.
Step-by-Step
- Check the Windows version. On the offline PC, press
Windows+R, enterwinver, and note the version and OS build. Open Settings > System > About to confirm whether Windows is 64-bit. If your Windows build is too old for the current WSL package, update Windows using an approved offline servicing method first; do not assume a current installer supports every build. - Choose the installation method. For a supported Windows build, use Microsoft’s current WSL MSI installer plus a distro package. This is generally the practical route for a fully offline setup. The
wsl --installcommand normally downloads WSL components and a distribution, so it is not an offline solution by itself. If you cannot use the MSI or your Windows build requires inbox WSL, use the optional-feature method in Step 5. - Download the files on a connected computer. From Microsoft’s official WSL releases page, download the appropriate stable WSL MSI for the offline PC’s architecture. Also download the Linux distribution package you want from the distribution’s official source or Microsoft Store download links where available. Select a package compatible with the PC and WSL version. If a distro package is unavailable, obtain that distribution’s documented root filesystem archive instead. Avoid third-party download sites.
- Transfer and verify the files. Copy the MSI and distro package or root filesystem archive to a USB drive. If the publisher provides a checksum or signature, verify it on the connected computer before transfer. Safely eject the drive, connect it to the offline PC, and copy the files to a local folder such as
C:\WSL-Setup. Keep the original files until installation and launch succeed. - Enable the Windows features if required. Open Windows Terminal or PowerShell as administrator. For a modern WSL installation, run
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestartanddism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart. Restart the PC if prompted, or restart after the next step. If DISM reports that source files are missing, use a matching Windows installation source or an approved offline servicing process; a distro package cannot replace missing Windows components. - Install the WSL package. In an administrator PowerShell window, change to the folder holding the MSI, then run
msiexec /i .\wsl.*.msiusing the actual MSI filename. Alternatively, double-click the MSI and follow the installer. If the command’s wildcard does not resolve as expected, specify the full MSI filename. Restart if requested. Runwsl --versionto check whether the WSL package installed; on some legacy configurations that command is unavailable, which does not necessarily mean inbox WSL is broken. - Install the Linux distribution. For an
.appxor.msixbundlepackage, open PowerShell and runAdd-AppxPackage -Path "C:\WSL-Setup\package-name.msixbundle", replacing the path with the exact filename. If Windows says the package depends on another framework or package, obtain that dependency from its official source and install it first. For a root filesystem archive, create an installation folder, for exampleC:\WSL\Ubuntu, then runwsl --import Ubuntu C:\WSL\Ubuntu C:\WSL-Setup\rootfs.tar. Use the archive’s actual path and a unique distribution name. - Start the distribution and finish setup. Run
wsl -l -vto see installed distributions, then launch the distro by its listed name or from the Start menu. On first launch, create a Linux username and password if prompted. An imported root filesystem may start as the root user and may not create a user automatically; follow that distribution’s documentation to add a normal user and configure the default account. - Confirm the installation. Run
wsl -l -vand confirm the distro appears. To use WSL 2, hardware virtualization must be enabled in firmware and the Virtual Machine Platform feature must be available. Set the distro to version 2 withwsl --set-version Ubuntu 2, substituting its name. If conversion cannot complete offline, use WSL 1 temporarily or transfer any required update package from Microsoft on a connected computer.
Common Mistakes
- Running
wsl --installand expecting it to work offline. It often needs to download components or a distro. - Downloading a package for the wrong processor architecture or Windows build. Check the PC’s architecture and the package requirements before transfer.
- Installing an app package without its required framework dependencies. Read the exact error and obtain dependencies from official sources.
- Assuming WSL 2 works without virtualization. Enable Intel VT-x or AMD-V in firmware, and make sure Virtual Machine Platform is enabled.
- Extracting an archive and trying to launch it directly. Use
wsl --importfor a root filesystem archive, or install the app package withAdd-AppxPackage.
Tips
- Prepare the USB drive and installation files before taking the offline PC out of a connected environment.
- Keep a copy of the distro’s official setup instructions and package checksums alongside the files.
- Use a short, clear installation path and distro name to reduce quoting and path errors.
- After installation, remember that Linux package managers such as
aptstill need network access to download updates. Offline WSL installation does not provide offline software repositories. - For managed or workplace PCs, ask the administrator before enabling features or installing packages; policy may block either operation.
Troubleshooting
“The system cannot find the file specified” or the MSI will not open: Confirm the file was copied completely, check its extension and exact name, and run the command from the correct folder. Re-download it from Microsoft if its integrity is uncertain.
DISM reports missing source files: The required Windows feature payload may not be present locally. Use matching installation media or a Windows image that corresponds to the installed edition, language, and build, following your organization’s servicing procedure. Do not use files from an unrelated Windows version.
App installation reports a dependency or publisher error: Check the package architecture, Windows compatibility, and any named dependency. Obtain missing dependencies from the publisher or Microsoft. If Windows requires a trusted certificate or a different signing policy, do not bypass security controls; use a properly signed package.
WSL 2 reports that virtualization is unavailable: Check that virtualization is enabled in UEFI/BIOS, enable Virtual Machine Platform, and restart. On a virtual machine, nested virtualization may need to be enabled by its host.
The distro does not appear or start: Run wsl -l -v and check the exact registered name. For an imported distro, confirm the archive is a valid root filesystem tar and that the destination folder is writable. If necessary, remove the failed registration with wsl --unregister NAME and import again; this deletes that distro’s data, so back up anything important first.
Frequently Asked Questions
Can I install WSL with no internet on the Windows PC?
Yes, if you bring the required WSL installer, distro package or root filesystem, and any dependencies on removable media. Some Windows feature payloads may also require matching installation media.
Can I install WSL without another computer?
Only if the required files are already on the PC or on removable media. Otherwise, you need a connected device to download and transfer them.
Does offline installation include Ubuntu or another Linux distro?
No. Install WSL and the distribution separately. You must download a compatible distro package or root filesystem before going offline.
Can I use WSL 2 offline?
Usually, yes, once its components are installed and hardware virtualization is available. A Windows or kernel update may need to be downloaded separately if the installed components are outdated.
Will Linux commands that install software work offline?
Only if the needed packages and repositories are already available locally. Commands such as sudo apt install normally contact online repositories.