How to install Ubuntu on Windows 10

<!–

–>

You can install the Ubuntu distribution alongside Windows 10 to run your favorites Linux tools without the need to switch computers or creating a virtual machine. Microsoft is making the move to get more developers to code on any platform but using Windows 10 as their main tool. However, for this to happen, the company has partnered with the guys behind Ubuntu Linux (Canonical) to expand the command line toolset on Windows 10.

Although the Linux integration into Windows 10 does not come included by default, the process to install Linux distros is not difficult once you set up the Windows Subsystem for Linux 2 (WSL2) platform on your computer.

In this guide, you will learn the steps to install Ubuntu on Windows 10.

Install Ubuntu on Windows 10 via GUI

To install Ubuntu on the Windows Subsystem for Linux 2, use these steps:

  1. Open Start on Windows 10.

  2. Search for Turn Windows Features on or off and click the top result to open the Windows Features settings.

  3. Check the Virtual Machine Platform option.

  4. Check the Windows Subsystem for Linux option.

    Enable WSL components
    Enable WSL components
  5. Click the OK button.

  6. Click the Restart now button.

  7. Click this link to download the WSL2 Linux Kernel update on the device.

  8. Double-click the wsl_update_x64.msi file to apply the update.

  9. Click the Next button.

    Install WSL2 Kernel Update
    Install WSL2 Kernel Update
  10. Click the Finish button.

  11. Open Start.

  12. Search for Run and click the top result to open the Run command.

  13. Type the wsl --set-default-version 2 command to make WSL2 the default platform.

    Set WSL2 default platform
    Set WSL2 default platform
  14. Click the OK button.

  15. Open Microsoft Store.

  16. Search for Ubuntu and select the latest version available. For example, “Ubuntu 20.04 LTS.”

  17. Click the Get (or Install) button.

    Install Ubuntu on Windows 10
    Install Ubuntu on Windows 10
    .Windows_Software_Technology-Big-343 { display:inline-block; width: 300px; height: 600px; } @media(min-width: 500px) { .Windows_Software_Technology-Big-343 { width: 300px; height: 600px;} }
  18. Click the Launch button to start Ubuntu.

  19. Continue with the on-screen directions to complete the setup.

Once you complete the steps, you can start using the Linux terminal on Windows 10 to access apps, such as Git, Ruby, Python, grep, awk, sed, and many more tools. For commands reference, you can use this Microsoft documentation page.

Install Ubuntu on Windows 10 via Command Prompt

To install the Ubuntu manually with Command Prompt, use these steps:

  1. Open Start on Windows 10.

  2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.

  3. Type the following command to install the Windows Subsystem for Linux and press Enter:

    dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
  4. Type the following command to install the Virtual Machine Platform and press Enter:

    dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
    WSL dism commands
    WSL dism commands
  5. Restart the computer.

  6. Click this link to download the WSL2 Linux Kernel update on the device.

  7. Double-click the wsl_update_x64.msi file to apply the update.

  8. Click the Next button.

  9. Click the Finish button.

  10. Open Command Prompt as administrator.

  11. Type the following command to set WSL2 the default platform and press Enter:

    wsl --set-default-version 2
  12. Type the following winget command to install Ubuntu on Windows 10 and press Enter:

    winget install ubuntu
    winget install Ubuntu on Windows 10
    winget install Ubuntu on Windows 10
  13. Open Ubuntu from the Start menu.

  14. Continue with the on-screen directions to complete the setup.

After you complete the steps, the WSL2 components, as well as the Ubuntu Linux distribution, will install on your computer.

Install Ubuntu on Windows 10 via WSL

On build 20246 and higher releases, Windows 10 automates the process to install all the Windows Subsystem for Linux components and Ubuntu with a single command.

To quickly install WSL2 and the Ubuntu Linux distro with the WSL command-line tool, use these steps:

  1. Open Start on Windows 10.

  2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.

  3. Type the following command to install the WSL2 and Ubuntu and press Enter:

    wsl --install
    WSL2 and Ubuntu install command
    WSL2 and Ubuntu install command
  4. Restart computer.

  5. Open Ubuntu from the Start menu.

  6. Continue with the on-screen directions to complete the setup.

Once you complete the steps, the required Linux components will install automatically on Windows 10 as well as the latest version of Ubuntu.

Post a Comment