Install Go Programming Language

Here, you will learn to install Go programming language for application development.

Go can be installed on Windows, macOS, and Linux. You can also install multiple versions of Go on the same machine.

Go is an open-source programming language, so you can install it by checking out the sources from git repositories, build them on your own machine, and run them. Visit https://go.dev/doc/install/source to install go from the source.

Install Go on Windows

There are no pre requisites to install Go on Windows. You can download the MSI file of the installer and run it.

First, go to the following website and download the latest Golang version: https://go.dev/doc/install

Download the installer based on your computer’s operating system. The page lists the Go installer for Linux, Mac, and Windows operating systems. If you don’t find your operating systems on the above page, then try it here https://go.dev/dl/

We will install Go on Windows operating system. The latest Go version is Go1.18.3.

Click on Download Go for Windows button to download the latest version of the Go MSI file to your local computer.

Install Go Programming Language

Open the MSI file from the location of the download and follow the prompt to install go. By default, Go is installed in the Program Files or Program Files (x86).

Double click on the MSI installation file. A go Setup wizard opens.

Install Go Programming Language

On clicking Next, you are prompted to accept the License Agreement. Accept and click Next.

Install Go Programming Language

On the next screen, the default destination folder is displayed. You can change the location by clicking Change… or you can keep the default folder as is. Click Next.

Install Go Programming Language

Click Install on the next screen to begin installing.

Install Go Programming Language

Windows will prompt you for permission to install. Click yes and continue. Go installation starts.

Install Go Programming Language

After installing, click on the Finish button to complete installing Go.

Install Go Programming Language

To test if Go is installed correctly on your computer, open the command prompt and enter the following command:

go version

Install Go Programming Language

The go version is displayed as shown above. Go is installed successfully.

You can check if GOPATH is set by navigating to Environmental Variables under Control Panel > System and Security > System > Advanced Settings > Environmental Variables…, as shown below.

Install Go Programming Language

Multiple versions of Go can be installed on the same machine. Visit https://go.dev/doc/manage-install manage Go installation for more information.