Open ilingleb117 opened 2 years ago
I would love this! I have many systems that I'd love to install on but not all have internet at once
+1 for offline distribution like Windows Terminal with the license file.
+1
Installing Linux distributions offline is available since the inception of WSL. For new users, the WSL from Windows Store makes it even easier from command line. See this blog post https://devblogs.microsoft.com/commandline/the-windows-subsystem-for-linux-in-the-microsoft-store-is-now-generally-available-on-windows-10-and-11/
Thank you for your reply!Unfortunately, I still have no idea on how to install the linux distribution offline since those commands introduced are online-necessary, would you have any suggestions on it?
There are multiple ways it can be done. I would suggest to look into various Superuser or Stackoverflow threads out there. If those do not help please provide the preferred way you want to install it. Like the current situation, what are the steps or websites are allowed etc.
Thank you for your reply! I'm now trying to install WSL2 without internet connection. I did the same as the manual tutorial https://learn.microsoft.com/en-us/windows/wsl/install-manual and after I installed the distribution, the installation seemed to be successful without any error message. But then when I tried to start the distribution, just nothing happened. I tried rebooting, reinstallation but all these things not work. I search this issue on internet, but less useful information beside this thread which told me that offline installation is unrealistic. I will appreciate it if you have any suggestions.
Which distribution did you install and using which command?
I used the ubuntu20.04, using command like
Add-AppxPackage .\CanonicalGroupLimited.UbuntuonWindows_2004.2021.825.0.AppxBundle
also I tried just double click the appx, the result is the same.
IIRC there is an issue about the AppxBundle file. I hope the following method do not create another problem. This may not be the most user friendly way to install the package but it just works 😌
AppxBundle, as the name suggests, is a bundle of multiple Appx files. So the procedure is to extract the correct Appx, then extract the actual required files from it. For the Ubuntu 20.04 case (as Kumori123 asked), it would be
CanonicalGroupLimited.UbuntuonWindows_2004.2021.825.0.AppxBundle
↓
Ubuntu_2004.2021.825.0_x64.appx
↓
install.tar.gz and ubuntu.exe
The AppxBundle and Appx is just ZIP file. Use any tool as you want. Extract install.tar.gz and ubuntu.exe in any folder. Double click on ubuntu.exe and the rest will be as usual.
I have written an article about installing the entire WSL + Ubuntu distribution in offline mode.
In short, it has something to do with permission, which I can't figure out why. But you can simply copy out the installed applications to any directory (e.g c:) and you will be able to access normally. This happens to all packages like windows terminal
and so on
I have written an article about installing the entire WSL + Ubuntu distribution in offline mode.
Little suggestion. Try NOT to do or change anything with C:\Program Files\WindowsApp
directory. It may work at that time but things may start to break apart. There are many issues about it. Instead of copying from that directory, just extract the Appx file as above.
Little suggestion. Try NOT to do or change anything with
C:\Program Files\WindowsApp
directory. It may work at that time but things may start to break apart. There are many issues about it. Instead of copying from that directory, just extract the Appx file as above.
Thanks for the suggestion.
May I get some references on the issues that you are talking about?
IIRC there is an issue about the AppxBundle file. I hope the following method do not create another problem. This may not be the most user friendly way to install the package but it just works 😌
AppxBundle, as the name suggests, is a bundle of multiple Appx files. So the procedure is to extract the correct Appx, then extract the actual required files from it. For the Ubuntu 20.04 case (as Kumori123 asked), it would be
CanonicalGroupLimited.UbuntuonWindows_2004.2021.825.0.AppxBundle ↓ Ubuntu_2004.2021.825.0_x64.appx ↓ install.tar.gz and ubuntu.exe
The AppxBundle and Appx is just ZIP file. Use any tool as you want. Extract install.tar.gz and ubuntu.exe in any folder. Double click on ubuntu.exe and the rest will be as usual.
Why not extract the entire content?
Why just install.tar.gz and ubuntu.exe
?
May I get some references on the issues that you are talking about?
I can not recall the exact link of those issues. But the gist of it is that - the UWP packages run with different system user and permission. Changing that user permission of WindowsApps directory may break the entire UWP stack.
Why not extract the entire content? Why just install.tar.gz and ubuntu.exe?
Because you do not need other files just to install the distribution. I have tested with Ubuntu 20.04 as kumori123 asked. Other distributions may require different files. Feel free to extract all the files as suggested here https://learn.microsoft.com/en-us/windows/wsl/install-on-server
Thanks, learned something new today.
And why wouldn't microsoft publish a complete package for offline deployment? AMD drivers, Windows Terminal, images with embedded applications (for example SW_DVD5_NTRL_Win_10_1709_32_64_ARM64_MultiLang_App_Update_X21-50436.ISO ) and many other packages include license files. You can conduct an experiment. Install Windows 10 into a virtual machine without internet enabled. Transfer the Windows Terminal to the machine.App and WindowsTerminal.xml . Scenario one: you install the package properly via DISM (including the license file /LicensePath:), the result is: the application starts. Scenario two: you installed Windows Terminal without a license file (/SkipLicense), the result: the application does not start. Scenario three: you also install the application without a license file, provide Internet access to the machine, the result: the application works. In this case, after disconnecting the Internet, the application will continue to work
If someone has access to Microsoft Store for Business or Microsoft Store for Education, then please generate license files. It seems to me that we will not wait for the full package from microsoft and we will see a crutch solution in the form of manual unpacking of archives.
Thank you all!
Came here looking for a license file for the Ubuntu apps.
Just in case anybody is looking for an offline installation, using the cmdlet Add-AppxPackage
will install the package, but you will not be able to run it as the app does not have a license yet (you'll get an error in the event log). For an offline install, you need to use Add-AppxProvisionedPackage -Online
and provide the package and the offline license file.
So, the issue here is that we are in need of the proper offline license files, just like the Windows Terminal guys did in their PreinstallKit.zip.
May I ask how this was resolved in the end? I did not find an offline license on the network.
May I ask how this was resolved in the end? I did not find an offline license on the network.
Yes. I have few workarounds for offline installation. One of them:
Thank you very much. This method is very effective
Following these instructions you can't run installed Linux distribution without internet because any UWP app requires check licence through active online connection.
Suggestion
Add license file download option like release Windows Termimal (see non preview version) for example. Then the installation command will look like this:
DISM.exe /Online /Add-ProvisionedAppxPackage /PackagePath:Ubuntu.appxbundle /License:Ubuntu.xml