Amazon Cyber Monday deals See deals →ad

Mets Minor League Blog

Music theory, instruments and musicians

Mets Minor League Blog

Music theory, instruments and musicians

Install WSL Without Internet: Offline Setup Guide

You can install Windows Subsystem for Linux (WSL) on a PC that cannot reach the internet, but you must bring the required Windows components and a Linux distribution to it on removable storage or a local network share. The most reliable route is to enable WSL in Windows, install the WSL 2 kernel if needed, then import a distribution archive prepared on another computer. If no computer or installation media can provide those files, you cannot complete a new distribution install offline.

This guide covers Windows 10 and Windows 11, with WSL 1 as an option for PCs that cannot use WSL 2. Run commands in an elevated PowerShell window, and confirm that your Windows edition and company policies allow optional features and app installation.

What You’ll Need

  • A Windows 10 or Windows 11 PC with administrator access. For WSL 2, use a supported, fully serviced Windows build; Windows 10 version 2004, build 19041, or later is a practical baseline. Older Windows 10 releases may support WSL 2 only after specific updates.
  • A USB drive or other way to copy files to the offline PC, with enough free space for the installer files and Linux distribution.
  • On an internet-connected computer, either an exported WSL distribution archive or a trusted Linux distribution package or root filesystem archive. An export from a working WSL PC is usually easiest.
  • For WSL 2 on systems using the in-box WSL components, the official Microsoft WSL 2 Linux kernel update MSI. Download the correct architecture, usually x64, from Microsoft. Some newer WSL installations use separately packaged WSL components instead; see Step 3.
  • For WSL 2, hardware virtualization enabled in firmware and available to Windows. If virtualization is disabled or blocked by your organization, use WSL 1 or ask the administrator to enable it.

Step-by-Step

  1. Check the offline PC before preparing files. Press Windows key + R, enter winver, and note the Windows version and build. Open Task Manager, choose Performance, then CPU, and check whether Virtualization is enabled. If Windows is too old for WSL 2, arrange Windows servicing from approved offline update media or plan to use WSL 1. Also check whether the processor architecture is x64 or ARM64 so that any kernel installer matches the PC.
  2. Prepare the Linux distribution archive on another computer. If you have a working WSL installation, open PowerShell there and run wsl --list --quiet to see its registered distributions. Export the one you want with wsl --export Ubuntu D:\ubuntu.tar, replacing Ubuntu with the exact listed name and choosing a destination with adequate space. Copy the resulting tar file to the USB drive. Exporting preserves the distribution’s Linux filesystem and is usually more straightforward than installing a Store app offline. If you do not have a source WSL installation, obtain a distribution package or root filesystem archive from the distribution publisher’s official source using a connected computer. Do not use an unknown archive: it can contain unsafe or modified software. Keep the package format in mind, because an Appx package is installed differently from a root filesystem tar archive.
  3. Collect the WSL 2 kernel or WSL component installer if required. For the in-box WSL setup, use a connected computer to download the official Microsoft WSL 2 Linux kernel update MSI for the target architecture, then copy it to the USB drive. Use Microsoft’s own download page or link, not a third-party mirror. On systems that require the newer, separately packaged WSL rather than the in-box kernel, download the appropriate official WSL release installer as well and follow its documented offline installation requirements. Do not rely on wsl --update, wsl --install, or --web-download on the offline PC; those options need a network connection. If your organization controls Windows updates or app installation, confirm the approved package with its IT team first.
  4. Enable the Windows features. Copy the files to the offline PC, then open PowerShell as Administrator. Enable the WSL feature with dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart. For WSL 2, also run dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart. If you only want WSL 1, the first feature is normally sufficient. DISM uses Windows components already present in the system image; if it reports that source files are missing, you may need matching Windows installation media or an approved repair source. Do not continue by repeatedly retrying the same command.
  5. Restart Windows. Save your work and restart the PC so the optional features become active. If the PC is managed, allow any required restart and policy checks to finish. After signing back in, open PowerShell and run wsl --help. If Windows does not recognize the command, verify the feature state and Windows build before proceeding; some older systems need servicing updates or a supported WSL package installed from offline media.
  6. Install the WSL 2 kernel when using the in-box setup. Find the Microsoft kernel MSI you copied, right-click it, choose Install, and approve the prompt. You can also run the MSI from an elevated PowerShell window using its full file path. If the MSI reports an architecture mismatch, obtain the correct x64 or ARM64 version on the connected computer. If you are installing a separately packaged WSL release, use that release’s official installer instructions instead of assuming the legacy MSI is a replacement for every WSL component.
  7. Choose the WSL version. For WSL 2, run wsl --set-default-version 2 in PowerShell. This sets the default for distributions you import or install later; it does not convert distributions that already exist. If the command is unavailable or fails because of the Windows build, check that both optional features are enabled, the PC has restarted, and the kernel component is installed. If hardware virtualization is unavailable, set the default to 1 instead, or specify version 1 when importing.
  8. Import the distribution archive. Create a folder for the Linux installation, for example C:\WSL\Ubuntu, and make sure it is on a drive with enough free space. Then run wsl --import UbuntuOffline C:\WSL\Ubuntu E:\ubuntu.tar --version 2, substituting the actual USB path and archive filename. Use --version 1 if you chose WSL 1. The name UbuntuOffline is the name Windows will use to identify this instance; it does not have to match the original exported name. Keep the archive until the imported distribution starts successfully. If you have an official Appx or AppxBundle instead of a tar archive, do not pass it to wsl --import: install the app package using the supported Windows package installer, including any required dependency packages, then launch the distribution to complete its first-run setup.
  9. Start Linux and check the result. Run wsl -d UbuntuOffline or open the distribution by its registered name. An imported archive may open as the root user by default, and it may not include a Windows Start menu launcher. Check the Linux release with cat /etc/os-release and check registration and version with wsl --list --verbose. If you need a normal user, create one inside Linux and configure it as the default in /etc/wsl.conf, then restart that distribution with wsl --terminate UbuntuOffline. Follow the distribution’s own instructions for setting the default user, since the method can vary.

Common Mistakes

  • Expecting the one-command installer to work offline. wsl --install commonly downloads WSL components and a distribution. It is not a complete offline installer; prepare the required packages and archive elsewhere.
  • Confusing an Appx package with a Linux filesystem tar. Appx packages are installed as Windows apps. The wsl --import command expects a Linux filesystem archive, such as an exported WSL tar.
  • Skipping the restart or one of the WSL 2 features. The Subsystem feature and Virtual Machine Platform are separate. WSL 2 needs both, and enabling them does not take effect fully until Windows restarts.
  • Using the wrong architecture or distribution name. A kernel installer for ARM64 will not install on x64 Windows, and the name supplied to an export command must match the name returned by wsl --list.
  • Assuming an import creates a regular user automatically. Imported distributions often start as root. Create and configure a non-root account if that is what you need, and avoid running routine Linux work as root.

Tips

  • Prepare and test the USB files before visiting the offline PC. Keep the kernel installer, distribution archive, and any package dependencies together in clearly named folders.
  • Save a checksum or file size for important downloads and compare it after copying. Use publisher-provided verification instructions when available.
  • Prefer exporting a known-good distribution if you need its existing packages and configuration. A clean publisher-provided root filesystem is better when you want a fresh system rather than a copy of another user’s environment.
  • For restricted work PCs, ask IT whether optional Windows features, virtualization, Appx installation, and imported Linux distributions are permitted. Local administrator rights do not override every organizational policy.
  • Keep the original archive until you have verified the imported distribution and backed up any data you need. A successful import copies the filesystem to the chosen install folder, but the USB archive remains a useful recovery copy.

Troubleshooting

Windows says the feature name is unknown or DISM cannot find source files: Confirm the Windows edition and build, run PowerShell as Administrator, and check spelling in the feature command. If DISM specifically requests source files, use Windows installation media that matches the installed release and architecture, or ask IT for a valid offline repair source. Avoid using unrelated Windows media, which may not contain compatible components.

WSL 2 reports that a required component is missing: Confirm that Virtual Machine Platform and Windows Subsystem for Linux are enabled, restart, and install the matching official kernel package if your setup uses the in-box WSL components. Check firmware virtualization as well. If virtualization cannot be enabled, import the distribution as WSL 1 instead. If the PC is managed, a hypervisor or virtualization policy may be responsible.

The import says the file cannot be opened or is not a valid distribution: Check that the path is correct, the USB drive letter has not changed, and the file is a real Linux root filesystem tar rather than an Appx installer or a compressed download that has not been extracted. Recopy the archive if its size differs from the source. Make sure the target install folder is writable and not the same location as the archive.

The distribution imports but will not launch, or starts as root: First check wsl --list --verbose and start it by its registered name. A root prompt is normal for many imported archives; it does not mean the import failed. If launch fails with a version or kernel error, verify the WSL version and kernel installation. If Linux reports filesystem or package errors, restore from a known-good export rather than changing files blindly.

You have no internet on any computer: WSL itself may be enabled from Windows files already present, but you still need a Linux distribution archive or package. Obtain one from approved local installation media, an existing WSL machine, or an administrator’s file share. Without any source for those files, postpone the distribution setup until they can be supplied.

Frequently Asked Questions

Can I install WSL with no internet anywhere?
Only if you already have the necessary Windows components or media and a Linux distribution package or archive. A new distribution cannot be downloaded from a disconnected PC, so arrange an existing local copy first.

Can I install WSL without the Microsoft Store?
Yes. Enable the Windows features manually and import a trusted Linux root filesystem tar. If you use a distribution Appx package, install it offline with its required dependencies rather than using the Store.

Do I need WSL 2?
No. WSL 1 can be useful when virtualization is unavailable or the Windows build does not support WSL 2. WSL 2 provides a real Linux kernel and broader compatibility, but requires Virtual Machine Platform and hardware virtualization.

Can I copy an installed WSL distribution from another PC?
Yes. Use wsl --export on the source PC, transfer the tar archive, then use wsl --import on the offline PC. Check the distribution’s licensing and avoid transferring data you are not authorized to copy.

Will the offline installation update itself later?
Not while it remains disconnected. WSL components and Linux packages need approved offline updates or a connection later. Keep track of the Windows and distribution versions you installed, and apply security updates when an approved update path is available.

Install WSL Without Internet: Offline Setup Guide
Scroll to top