CTCaliberTek
Course: Go Developer Path · Lesson 1 of 5Log in to track your progress and earn a certificate when you finish the course.
Programming

Go for Beginners: Install Go and Write Your First Program

Published September 4, 2026·Updated October 29, 2026·6 min read
Like SaveLog in to like, save, and track progress.

Introduction

Go is a fast, simple, compiled language created at Google, widely used for cloud services, command-line tools, and networked software. This tutorial takes you from installation to running and building your first program.

Prerequisites

  • A computer running Windows, macOS, or Linux
  • Access to a terminal or command prompt

Step-by-Step Guide

Step 1: Install Go

Download the installer for your operating system from go.dev/dl and run it. The installer adds the go command to your PATH.

Step 2: Verify the installation

Open a new terminal and check the installed version.

go version

Step 3: Create a module

A module is a Go project with a go.mod file that tracks its name and dependencies.

mkdir hello
cd hello
go mod init example.com/hello

Step 4: Write your first program

Create main.go. Every executable program lives in package main and starts at the main function.

package main

import "fmt"

func main() {
    fmt.Println("Hello, CaliberTek!")
}

Step 5: Run and build

go run compiles and runs in one step. go build produces a standalone executable you can copy to another machine of the same operating system.

go run .
go build

FAQs

Do I need to set GOPATH?
Not for modern Go. Since modules were introduced you can create projects anywhere and manage dependencies with go.mod.
Why is Go popular for backend and cloud tools?
It compiles quickly to a single static binary, has built-in concurrency features, and keeps the language small and easy to read.

Summary

Install Go, create a module with go mod init, and use go run and go build. From here, learn variables, functions, slices, maps, structs, and goroutines.

Related tutorials

Comments

Log in or create a free account to join the discussion.

  • No comments yet. Be the first to comment.