Installation & Setup
Step-by-step guide to installing the official Go compiler, configuring environment paths, and setting up VS Code or GoLand.
“Installing Go is like setting up a carpenter workshop: GOROOT is the storage shed where the factory tools live, and GOPATH/workspace is your personal workbench.”
[Terminal] ──> go version ──> go1.24+ Installed!
│
├── GOROOT: Location of standard library & compiler
└── GOPATH: Downloaded third-party modules cacheKey Concepts & Rules To Remember
- Download and install from the official site (go.dev).
- Verify installation with `go version` in your terminal.
- Install the official Go extension in VS Code for instant autocompletion and error detection powered by `gopls`.
- Initialize any new project anywhere with `go mod init <name>`.
1. Verifying Your Installation
Once installed, open any terminal or command prompt and run `go version`. You should see the active Go version and CPU architecture.
$ go version
go version go1.24.0 linux/amd64
# Check active environment settings
$ go env GOPATH GOROOT2. Setting Up Your Editor
Install Visual Studio Code and install the official "Go" extension by Google. This automatically installs `gopls` (the official Go language server), giving you syntax highlighting, auto-imports on save, and type hints.
// .vscode/settings.json (Recommended Beginner Settings)
{
"editor.formatOnSave": true,
"go.useLanguageServer": true
}Common Beginner Pitfalls & Mistakes
Knowledge Check
Verify your understanding with these interactive practice questions.
Quizzes
Quick checks for understanding
Multiple-choice with inline explanations—expand to see why.
Finished this lesson?
Mark it as complete to track your overall Go mastery.