Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

Install Go (Golang) on Windows

Download the Go installer, run it and check the version.

Windows Hosting2 min read8 screenshots

System requirements

Minimum

  • Windows 7 or later (Windows 10 is recommended; recent Go versions need Windows 10 or newer).
  • 200 MB of free disk space.

Recommended

  • A multi-core processor (2 GHz or more).
  • 4 GB of RAM or more.
  • 1 GB or more of free disk space, ideally on an SSD.

Step 1: Download Go

Open the official Go download page (go.dev/dl) and download the Windows installer (the .msi file).

The Go download page

Step 2: Run the installer

Open the .msi file.

Welcome screen. Click Next.

The Go setup wizard

License. Accept the license agreement.

The end-user license agreement

Destination folder. The default is C:\Program Files\Go. Keep it.

Choosing the destination folder

Install. Click Install, then Finish.

Ready to install
Installing Go

The installer adds Go to the PATH for you.

Step 3: Check Go

Open a new Command Prompt:

go version
The Go version

If the command is not found, check the PATH: it must include C:\Program Files\Go\bin.

Editing the environment variables

Set up your work environment

  • Editor or IDE. Visual Studio Code with the Go extension, or GoLand.
  • Git. Needed to fetch Go packages from repositories.

A first program

Create a folder and a file main.go:

package main

import "fmt"

func main() {
    fmt.Println("Hello, Go!")
}

Initialize a module and run it:

go mod init hello
go run main.go

Quick recap

  • Download and run the .msi installer.
  • Check with go version in a new window.
  • Use go run to run your code.