Install Go on Windows 11

Contents
Installer options
Install with winget
go version
GOPATH and PATH

Installer options

Windows 11 gives you two simple paths: the winget package manager and the classic MSI installer from the official download page.

Both install the same toolchain, so pick winget for speed and MSI when you want a guided setup window.

Install with winget

Open Windows Terminal or PowerShell and run the installer command below.

winget install -e --id GoLang.Go

Prefer clicks to commands. Then grab the MSI file from the official download page, run it, and accept the defaults.

Close and reopen the terminal after either method so the new PATH value is loaded.

go version

A fresh install should answer with its version number.

go version

go version go1.21 windows/amd64

If the command is not found, reopen the terminal once more and check the next section about PATH.

GOPATH and PATH

The installer adds the Go binary folder to user PATH and sets a default workspace for modules and tools.

go env GOPATH

C:\Users\user\go

go env GOROOT

C:\Program Files\Go

Leave the defaults while learning, and only edit system environment variables when you need a custom workspace location.

Next: Install Go on Ubuntu

Article author: Arthur Isaev

Related articles
Golang
Go course: zero to hero in 50 lessons
What is Go and where it runs
Install Go and check the version
Your first Go program
Modules with go mod
Variables
Constants
Types
Numbers
Strings
Conditions with if
Switch in Go
Loops with for
Arrays in Go
Slices in Go
Maps in Go
Functions in Go
Errors as values
Pointers in Go
Structs in Go
Methods in Go
Interfaces in Go
Embedding instead of inheritance
Generics in Go
Packages and imports
The go toolchain
Testing with go test
Advanced errors
defer in Go
Strings, bytes and runes
Time in Go
JSON
Files and IO
HTTP servers
HTTP clients
Context
Goroutines
Channels
select and sync
CLI: args, flags, env
Logging
Regular expressions
Sorting
Concurrency patterns
Databases with database/sql
Benchmarks and profiling
Toolchain and CI
Project layout
Capstone: wordfreq CLI
Capstone: JSON API server
Hero roadmap: the whole course on one page
Install Go on Windows 11
Install Go on Ubuntu
Install Go on Rocky Linux
Install Go on macOS
Install Go on FreeBSD
Go in Docker
Banner image

Search this site

Channel @aofeed Chat @aofeedchat

Contacts and cooperation:
I recommend our hosting beget.ru
Write to info@urn.su if you:
1. Want to write an article for our site or translate an article into your native language.
2. Want to place thematically relevant ads on the site.
3. Ads on my site pass maximum censorship. If you see an ad block unsuitable for school-age children, shocking or misleading - please contact us by e-mail
4. Found a mistake, inaccuracy, bug, etc. on the site. ... .......
5. Articles can be shared on social media by clicking a network icon: