How to Install Go on Windows
Go, or Golang, is a high-performance, multithreaded programming language developed by Google in 2007 and released in 2009. To this day, Golang continues to gain popularity.
The Go programming language is a flexible option for development on a variety of platforms because it supports a wide range of operating systems. We will go over how to install Golang on Windows step-by-step in this tutorial.

Installing GO on Windows is a simple process
Installing Go on Windows Copy link
Go supports Windows 7 and newer versions. Ensure that you have a supported version of the OS installed.
In this guide, we will use Windows 11. You will also need an administrator account to configure environment variables.
To install Golang on Windows:
- Download the installer for the latest version of Microsoft Windows from the official Go website. If needed, you can select any other available version of the language instead of the latest one.
- Once the file has finished downloading, run it and follow the installation wizard's instructions. If necessary, you can change the file location. This will be useful when configuring environment variables.
- After the installation, check if Golang was successfully installed on your system. To do this, open the terminal (Win + R → cmd) and run the following command:
go versionThe output should show the version of Go you just installed. For example:

GO version check
To update Golang to a newer version on Windows, you must uninstall the old version and follow the instructions to install the new one.
Now, let's move on to setting up environment variables so that Go works properly.
Setting Up Environment Variables Copy link
In order for the operating system to identify the location of the required Go files and directories, setting up environment variables is a crucial step in the Go installation process on Windows.
For Go to work correctly, two environment variables are required:
-
GOPATHpoints to where Go stores downloaded and compiled packages. -
PATHallows the system to find Go executable files without specifying their full paths.
GOPATH Copy link
- First, let's set up the
GOPATHenvironment variable. For this, you need to organize a workspace where Go files and projects will be stored.
In this guide, we will create a workspace at C:\GoProject. We will also add two directories to this folder:
-
-
bin– for storing executable files (binary files). Go creates an executable file and places it in this directory when you compile your project. -
src– for storing Go source files. All.gofiles will be placed here.
-
- After creating the workspace, we will set the
GOPATHenvironment variable. To do this, go to the Control Panel → System and Security → System and click on Advanced System Settings.
There is also an easier way to access system properties: open the Run window (Win + R) and enter:
sysdm.cpl- Click on Environment Variables, then click the New button under the User Variables section. Here, you need to fill in two fields: the variable name and its value.
- In the Variable name field, enter
GOPATH, and in the Variable value field, enter the path to the workspace you created earlier (in our case,C:\GoProject). - Click OK twice to save the changes.
- To verify the creation of the system variable, open the Run window (Win + R) and enter the string:
%GOPATH%If everything was done correctly, your workspace will open.
PATH Copy link
- The
PATHenvironment variable should have been automatically added after we installed Go. To check this, go to the Control Panel → System and Security → System and click on Advanced System Settings. - In the window that opens, you need to find PATH among the system variables. To view its values, double-click on it.
In the new window, there should be an entry that holds the path to the Go bin folder.

Go installation path
In our case, it is C:\Program Files\Go\bin. If your value does not match what was specified during the Go installation, change it to the correct one using the Edit button.
Golang has now been installed on Windows, and environment variables have been set up. We can now write and execute our first program to test its functionality.
Verifying Installation Copy link
To check the functionality of the newly installed Golang on Windows:
- Create a test file with the
.goextension in the workspace (C:\GoProject\src). For example,ExampleProgram.go. - Add the following simple code:
package main
import "fmt"
func main() {
fmt.Println("Hello, Go has been successfully installed into your system!")
}The program should display a message confirming that Go has been successfully installed on your system.
- To compile and run the program, enter the following command in the terminal:
go run %GOPATH%/src/ExampleProgram.goAs shown in the image below, the program compiles and runs, displaying the specified text on the screen.

Go Successfully Installed
Conclusion Copy link
Installing Go on Windows is a straightforward process, involving downloading the installer, setting up environment variables, and verifying the installation. Once Go is properly configured, you can easily start developing applications. With support for multiple operating systems, Go remains a powerful and versatile language, ideal for cross-platform development.
On our app platform you can deploy Golang apps, such as Beego and Gin.