Go Installation

Go Installation

In this tutorial, we will discuss about Go installation procedure in Mac OS, Windows and Linux environments.

Go Installation

Go can be installed on all the three platforms Mac, Windows, and Linux. You can download the binary for the corresponding platform from its official website.

Apple Mac OS
  1. Download the Mac OS installer from its official website.
  2. Double click to start the installation.
  3. Follow the prompts and this will have Golang installed in /usr/local/go and would have also added the folder /usr/local/go/bin to your PATH environment variable.
Microsoft Windows
  1. Download the MSI installer from its official website.
  2. Double click to start the installation and follow the prompts.
  3. This will install Go in location C:\Go and will also add the directory C:\Go\bin to your path environment variable.
  1. Download the tar file from its official website.
  2. Unzip it to /usr/local.
  3. Add /usr/local/go/bin to the PATH environment variable. This will install Go in Linux.
$ sudo tar -C /usr/local -xzf go1.15.6.linux-amd64.tar.gz

$ export PATH=$PATH:/usr/local/go/bin


Changes made to a profile file may not apply until the next time you log into your computer. To apply the changes immediately, just run the shell commands directly or execute them from the profile using a command such as

$ source $HOME/.profile
Verifying the Installation

To verify that Go installed successfully, type the command go version in the terminal and it will output the installed Go version. Here is the output in my terminal.

$ go version
go version go1.15.6 linux/amd64

1.15.6 was the latest version of Go when writing this tutorial. This confirms that Go has been installed successfully.

Go Installation
Scroll to top