How to Install Go on Windows, Mac, and Linux – Step-by-Step Setup
Installing Go on Windows
- Download the Windows installer (.msi) from the official Go website.
- Run the installer and follow the setup wizard — it automatically sets the
PATHenvironment variable. - Open Command Prompt and run
go versionto confirm installation.
Installing Go on macOS
# Using Homebrew
brew install go
# Verify installation
go version
Installing Go on Linux
wget https://go.dev/dl/go1.22.0.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.22.0.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin
go version
Setting Up Your Workspace
Modern Go uses Go Modules for dependency management, so you no longer need a strict GOPATH directory structure — simply run go mod init myproject inside any folder to start a new project.
PreviousWhat is Go Language? – Complete Introduction & Features for Beginners
Next Go Variables and Data Types Explained with Practical Examples
Ready to master real-world Go skills?
Learn Go hands-on with mentor-led, live sessions.
.png)