Go installation steps

Go (Golang) Installation Steps
Below are simple, instructions of Go installation steps for all major operating systems.
Install Go on Windows
Step 1: Download Go
Visit : https://go.dev/dl/
Download the Windows (.msi) installer (64-bit)
Step 2: Run Installer
Double-click the downloaded
.msifileClick Next → Install
Default path:
Step 3: Verify Installation
Open Command Prompt and run:
Output example:
Install Go on Linux (Ubuntu/Debian)
Step 1: Download Go
Step 2: Extract Files
Step 3: Set Environment Variables
Add this to ~/.bashrc or ~/.profile:
Apply changes:
Step 4: Verify
Install Go on macOS
Method 1: Using Installer (Easy)
Download
.pkgfrom https://go.dev/dl/Run installer
Follow on-screen instructions
Verify:
Method 2: Using Homebrew
Verify:
Set Up Go Workspace (Recommended)
Step 1: Create Project Folder
Step 2: Initialize Module
Run Your First Go Program
Create main.go:
Run:
Build executable:
Important Go Commands
| Command | Description |
|---|---|
go version | Check Go version |
go run | Run program |
go build | Compile program |
go mod init | Initialize module |
go get | Download packages |
