Download Go 1.17 and enjoy the latest improvements to the compiler and runtime
How to Download and Install Go 1.17 on Your Computer
Go is a popular open-source programming language that is designed for simplicity, concurrency, and performance. Go is used by many companies and projects, such as Google, Docker, Kubernetes, and GitHub.
In this article, you will learn how to download and install the latest version of Go, which is Go 1.17, on your computer. You will also learn about the new features and improvements of Go 1.17, the compatibility and requirements of Go 1.17, and how to write and run your first Go program with Go 1.17.
What is Go 1.17 and Why You Should Use It
Go 1.17 is the latest release of Go, which was released on August 16, 2021. It comes with several enhancements to the language, the toolchain, the runtime, and the libraries.
Go 1.17 Features and Improvements
Some of the main features and improvements of Go 1.17 are:
A new way of passing function arguments and results using registers instead of the stack, which improves performance and reduces binary size for amd64 platforms.
Support for the 64-bit ARM architecture on Windows (the windows/arm64 port), which allows running Go natively on more devices.
Pruned module graphs, which reduce the number of dependencies that need to be downloaded or read for modules that specify go 1.17 or higher in their go.mod file.
New functions in the unsafe package to make it easier to conform to the unsafe.Pointer rules: unsafe.Add for safer pointer arithmetic and unsafe.Slice for safer conversions of pointers to slices.
An extension to the language type conversion rules to allow conversions from slices to array pointers, provided the slice is at least as large as the array at runtime.
Verification improvements to crypto/x509, and alterations to URL query parsing.
Go 1.17 Compatibility and Requirements
As always, Go 1.17 maintains the , which means that almost all Go programs that work with previous versions of Go will continue to work with Go 1.17 without any changes.
However, there are some compatibility and requirements issues that you should be aware of before using Go 1.17:
Go 1.17 requires macOS 10.13 High Sierra or later; support for previous versions has been discontinued.
The new conversion from slice to array pointer is the first case in which a type conversion can panic at run time, which may affect some analysis tools that assume type conversions can never panic.
The main Go compiler does not yet support the LoongArch architecture, but it has reserved the GOARCH value "loong64".
How to Download Go 1.17 for Your Operating System
The easiest way to download Go 1.17 for your operating system is to visit the to manage multiple versions of Go on your system.
Download Go 1.17 for Linux
If you are using Linux, you can download the Go 1.17 binary distribution for your architecture from the download page. For example, if you are using a 64-bit x86 system, you can download the go1.17.linux-amd64.tar.gz file.
You can also use the following command to download and extract the file in your home directory:
How to download go1.17 for Windows
Download go1.17 source code
Go 1.17 release notes and features
Install go1.17 on macOS
Upgrade to go1.17 from previous versions
Download go1.17 for Linux
Go 1.17 performance improvements and benchmarks
Download go1.17 for FreeBSD
Go 1.17 module graph pruning
Download go1.17 for ARM64
Go 1.17 language changes and additions
Download go1.17 for PPC64LE
Go 1.17 unsafe package functions
Download go1.17 for S390X
Go 1.17 slice to array pointer conversion
Download go1.17 for Android
Go 1.17 crypto/x509 verification improvements
Download go1.17 for iOS
Go 1.17 URL query parsing changes
Download go1.17 for Raspberry Pi
Go 1.17 compiler optimizations and enhancements
Download go1.17 for Docker
Go 1.17 runtime improvements and bug fixes
Download go1.17 for WSL2
Go 1.17 library updates and changes
Download go1.17 for Chrome OS
Go 1.17 testing and debugging tools
Download go1.17 for AWS Lambda
Go 1.17 embedding interfaces with overlapping method sets
Download go1.17 for Google Cloud Functions
Go 1.17 net/http changes and fixes
Download go1.17 for Azure Functions
Go 1.17 database/sql changes and enhancements
Download go1.17 for Kubernetes
Go 1.17 text/template and html/template changes and fixes
Download go1.17 for Heroku
Go 1.17 reflect changes and enhancements
Download go1.17 for Termux
Go 1.17 os changes and fixes
Download go1.17 for Alpine Linux
Go 1.17 math/big changes and enhancements
Download go1.17 for Arch Linux
Go 1.17 sync changes and fixes
Download go1.17 for Debian Linux
Go 1.17 encoding/json changes and enhancements
Download go1.17 for Ubuntu Linux
Go 1.17 fmt changes and fixes
curl -L tar xz -C
Download Go 1.17 for Mac
If you are using Mac, you can download the Go 1.17 installer for your system from the download page. For example, if you are using a 64-bit x86 system, you can download the go1.17.darwin-amd64.pkg file.
You can also use the following command to download and install the file in your system:
curl -L sudo installer -pkg /dev/stdin -target /
Download Go 1.17 for Windows
If you are using Windows, you can download the Go 1.17 installer for your system from the download page. For example, if you are using a 64-bit x86 system, you can download the go1.17.windows-amd64.msi file.
You can also use the following command to download and run the file in your system:
curl -L msiexec /i /dev/stdin
How to Install Go 1.17 on Your Computer
After downloading Go 1.17 for your operating system, you need to install it on your computer. The installation process may vary depending on your system and preferences, but here are some general steps to follow:
Install Go 1.17 on Linux
If you downloaded the Go 1.17 binary distribution for Linux, you need to extract it to a location of your choice, such as /usr/local/go or /go.
You also need to add the bin subdirectory of the extracted location to your PATH environment variable, so that you can run the go command from anywhere.
You can do this by editing your /.profile or /.bashrc file and adding the following line at the end:
export PATH=$PATH:/usr/local/go/bin # or /go/bin
Then, reload your profile or bashrc file by running:
source /.profile # or /.bashrc
Install Go 1.17 on Mac
If you downloaded the Go 1.17 installer for Mac, you just need to run it and follow the instructions on the screen.
The installer will install Go 1.17 in /usr/local/go and add it to your PATH environment variable automatically.
Install Go 1.17 on Windows
If you downloaded the Go 1.17 installer for Windows, you just need to run it and follow the instructions on the screen.
The installer will install Go 1.17 in C:\Go and add it to your PATH environment variable automatically.
How to Verify Your Go 1.17 Installation
To verify that Go 1.17 is installed correctly on your computer, you can open a terminal or command prompt and run the following command:
This should print something like:
go version go1.17 linux/amd64 # or darwin/amd64 or windows/amd64
If you see an error message or a different version of Go, make sure that you have downloaded and installed Go 1.17 correctly and that your PATH environment variable is set properly.
How to Write and Run Your First Go Program with Go 1.17
To write and run your first Go program with Go 1.17, you need to create a file with a .go extension and write some code in it.
For example, you can create a file named hello.go and write the following code in it:
package main import "fmt" func main() fmt.Println("Hello, world!")
This is a simple Go program that prints "Hello, world!" to the standard output.
To run this program, you can use the go run command in the same directory as the hello.go file:
go run hello.go
This should print:
Congratulations, you have written and run your first Go program with Go 1.17!
In this article, you have learned how to download and install Go 1.17 on your computer. You have also learned about the new features and improvements of Go 1.17, the compatibility and requirements of Go 1.17, and how to write and run your first Go program with Go 1.17.
Go 1.17 is a major release of Go that brings several enhancements to the language, the toolchain, the runtime, and the libraries. It also maintains the Go 1 promise of compatibility, which means that almost all Go programs that work with previous versions of Go will continue to work with Go 1.17 without any changes.
If you want to learn more about Go 1.17, you can check out the of Go.
What is the difference between go run and go build?
The go run command compiles and runs a Go program without producing an executable file. The go build command compiles a Go program and produces an executable file that can be run later.
How can I update my existing Go installation to Go 1.17?
You can update your existing Go installation to Go 1.17 by following the same steps as installing Go 1.17 from scratch. The new version of Go will overwrite the old version of Go