Post

How to Install Go (Golang) on Your System

How to Install Go (Golang) on Your System

Go is a powerful, efficient programming language. Here is a quick guide to getting it installed on your machine.

1. Download Go

Visit the official Go download page and download the installer appropriate for your operating system (Windows, macOS, or Linux).

2. Installation

For macOS

If you use Homebrew, installation is simple:

1
brew install go

Otherwise, download the .pkg file and run the installer.

For Linux

  1. Download the archive file (e.g., go1.x.x.linux-amd64.tar.gz).
  2. Extract the archive:
    1
    
    tar -C /usr/local -xzf go1.x.x.linux-amd64.tar.gz
    
  3. Add Go to your PATH by adding the following line to your ~/.bashrc or ~/.zshrc:
    1
    
    export PATH=$PATH:/usr/local/go/bin
    

For Windows

Download the .msi file and run it. The installer will automatically add Go to your PATH.

3. Verify Installation

Open a terminal or command prompt and run:

1
go version

If successful, you will see the installed Go version.

Conclusion

Now that you have Go installed, you are ready to start building!

Suggested Reading

This post is licensed under CC BY 4.0 by the author.