Questions And Answers

More Tutorials

Go Download and Install

Installing Go is straightforward. You can install it from source, but I suggest you use one of the pre­compiled binaries.
When you go to the download page, you’ll see installers for various platforms. Let’s avoid these and learn how to set
up Go ourselves. As you’ll see, it isn’t hard.

Install Go on Windows

Download the latest zip file. If you’re on an x64 system, you’ll want­, where #.#.# is
the latest version of Go.

Unzip it at a location of your choosing. c:\Go is a good choice.

Set up two environment variables:
  • GoPATH points to your workspace. That might be something like c:\users\user\work\go.
  • Add c:\Go\bin to your PATH environment variable.

Environment variables can be set through the Environment Variables button on the Advanced tab of the System
control panel. Some versions of Windows provide this control panel through the Advanced System Settings option
inside the System control panel.

Open a command prompt and type go version. You’ll hopefully get an output that looks like go version go1.3.3

Install Go on Linux & Mac

Download the tar.gz for your platform. For OSX, you’ll most likely be interested in go#.#.#.darwin­amd64­osx10.8.tar.gz, where #.#.# is the latest version of Go.

Extract the file to /usr/local via tar ­-C /usr/local ­xzf go#.#.#.darwin­amd64­osx10.8.tar.gz.

Set up two environment variables:
  • GoPATH points to your workspace, for me, that’s $HOME/code/go.
  • We need to append Go’s binary to our PATH.

You can set these up from a shell:

echo 'export GoPATH=$HOME/code/go' >> $HOME/.profile
echo 'export PATH=$PATH:/usr/local/go/bin' >> $HOME/.profile

You’ll want to activate these variables. You can close and reopen your shell, or you can run source $HOME/.profile.

Type go version and you’ll hopefully get an output that looks like go version go1.3.3 darwin/amd64.


In this page (written and validated by ) you learned about Go Download and Install . What's Next? If you are interested in completing Go tutorial, your next topic will be learning about: Go Hello World.

Incorrect info or code snippet? We take very seriously the accuracy of the information provided on our website. We also make sure to test all snippets and examples provided for each section. If you find any incorrect information, please send us an email about the issue:

Share On:

Mockstacks was launched to help beginners learn programming languages; the site is optimized with no Ads as, Ads might slow down the performance. We also don't track any personal information; we also don't collect any kind of data unless the user provided us a corrected information. Almost all examples have been tested. Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. By using, you agree to have read and accepted our terms of use, cookies and privacy policy.