Operations 3 min read

How to Install Ubuntu on Windows 10 with WSL: A Step‑by‑Step Guide

This guide walks you through enabling the Windows Subsystem for Linux, downloading Ubuntu from the Microsoft Store, completing the installation, updating packages, and adding Go tools, providing screenshots and exact commands so you can develop Linux applications directly on Windows 10.

Liangxu Linux
Liangxu Linux
Liangxu Linux
How to Install Ubuntu on Windows 10 with WSL: A Step‑by‑Step Guide

Enable Windows Subsystem for Linux (WSL)

Open Control Panel → Programs → Turn Windows features on or off , locate Windows Subsystem for Linux , check the box, apply the changes and restart the computer when prompted.

Install a Linux distribution (Ubuntu) from Microsoft Store

After the reboot, open the Microsoft Store, search for Ubuntu (other free options include openSUSE Leap and SUSE Linux Enterprise Server), and click Install . When the installation finishes, launch Ubuntu from the Start menu.

Initial Ubuntu setup

The first launch completes a lightweight installation and prompts you to create a non‑root user name and password. This user will be used for subsequent commands.

Update package lists and upgrade existing packages

sudo apt update && sudo apt upgrade -y

This refreshes the APT repository metadata and upgrades all installed packages to their latest versions.

Install the Go toolchain and documentation tools

sudo apt install -y golang-go golang-golang-x-tools

The golang-go package provides the Go compiler, while golang-golang-x-tools includes godoc and other useful utilities.

Verify the installation

go version
go env

These commands should display the Go version (e.g., go version go1.20 linux/amd64) and the environment configuration, confirming that the toolchain is functional inside WSL.

Summary

Enabling WSL and installing Ubuntu provides a native‑like Linux environment on Windows 10 Pro, allowing developers to compile, test, and run Linux applications (including Go projects) without the overhead of a separate virtual machine.

Source: majianguo (cnblogs.com/majianguo/p/8047676.html)
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

GolangWSLUbuntusetupWindows10
Liangxu Linux
Written by

Liangxu Linux

Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.