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.
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 -yThis 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-toolsThe golang-go package provides the Go compiler, while golang-golang-x-tools includes godoc and other useful utilities.
Verify the installation
go version
go envThese 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)
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
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.)
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
