- 1 year ago
Failed to Install wsl Ubuntu on Windows Server Core via cmdlet Add-AppxPackage
Installing WSL (Windows Subsystem for Linux) and Ubuntu on Windows Server Core is not supported directly through the Add-AppxPackage
cmdlet because Server Core does not include the necessary components for running Windows Store apps. However, you can manually install WSL and Ubuntu on Windows Server Core by following these alternative steps:
Enable WSL:
- Open a Command Prompt or PowerShell window with administrative privileges.
- Run the following command to enable WSL:powershell
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
Install Ubuntu:
- Download the Ubuntu distribution package in
.appx
format from the official Ubuntu website. Make sure to choose the appropriate version and architecture. - Transfer the downloaded
.appx
package to your Windows Server Core machine. - Open a Command Prompt or PowerShell window on Windows Server Core with administrative privileges.
- Run the following command to install the Ubuntu distribution package:
ReplacepowershellAdd-AppxPackage -Path "C:\path\to\ubuntu.appx"
"C:\path\to\ubuntu.appx"
with the actual path to the downloaded Ubuntu.appx
package.
- Download the Ubuntu distribution package in
Set up Ubuntu:
- After the installation completes, open a Command Prompt or PowerShell window on Windows Server Core.
- Run the following command to launch the Ubuntu installation and set up the Ubuntu user account and password:powershell
ubuntu.exe install
- Follow the prompts to configure the Ubuntu installation.
With these steps, you should be able to install WSL and Ubuntu on Windows Server Core. After the installation is complete, you can launch the Ubuntu distribution by running ubuntu.exe
in a Command Prompt or PowerShell window.
Please note that running WSL and Ubuntu on Windows Server Core might have some limitations compared to running them on the Windows 10 or Windows Server with Desktop Experience editions. Ensure that your usage scenario is supported on Windows Server Core before proceeding.