adv

Kamis, 15 April 2021

Panduan Instalasi Windows Server - Enable the Windows Subsystem for Linux

 

Windows Server Installation Guide

Enable the Windows Subsystem for Linux

Before you can run Linux distros on Windows, you must enable the "Windows Subsystem for Linux" optional feature and reboot.

Open PowerShell as Administrator and run:

PowerShell
    Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

Download a Linux distribution

Follow these instructions to download your favorite Linux distribution.

Extract and install a Linux distribution

Now that you've downloaded a Linux distribution, in order to extract its contents and manually install, follow these steps:

  1. Extract the <distro>.appx package's contents, using PowerShell:

    PowerShell
    Rename-Item .\Ubuntu.appx .\Ubuntu.zip
    Expand-Archive .\Ubuntu.zip .\Ubuntu
    
  2. Run the distribution launcher application in the target folder. The launcher is typically named <distro>.exe (for example, ubuntu.exe).

    Expanded Ubuntu distro on Windows Server

 Caution

Installation failed with error 0x8007007e: If you receive this error, then your system doesn't support WSL. Ensure that you're running Windows build 16215 or later. Check your build. Also check to confirm that WSL is enabled and your computer was restarted after the feature was enabled.

3.Add your distro path to the Windows environment PATH (C:\Users\Administrator\Ubuntu in this example), using PowerShell:

PowerShell
$userenv = [System.Environment]::GetEnvironmentVariable("Path", "User")
[System.Environment]::SetEnvironmentVariable("PATH", $userenv + ";C:\Users\Administrator\Ubuntu", "User")

You can now launch your distribution from any path by typing <distro>.exe. For example: ubuntu.exe.

Now that it is installed, you must initialize your new distribution instance before using it.


source : https://docs.microsoft.com/en-us/windows/wsl/install-on-server

Tidak ada komentar:

Posting Komentar