Skip to main content
The -i flag downloads an official Go release tarball from go.dev/dl, extracts it into your workspace, creates shims and symlinks, and configures your shell environment.

Syntax

igo -i <version>
version
string
required
The Go version to install in X.Y.Z format (e.g. 1.23.4). Must be 1.16.0 or higher. igo verifies the version exists on go.dev/dl before downloading.

Examples

# Install Go 1.23.4
igo -i 1.23.4

# Install to a custom workspace directory
igo -i 1.23.4 -godir /Shared/go

# Show debug output during installation
igo -i 1.23.4 -debug

# Show verbose output during installation
igo -i 1.23.4 -verbose

What it does

1

Validate the version

igo checks that the version matches the X.Y.Z format and is at least 1.16.0. It then sends a HEAD request to go.dev/dl to confirm the tarball exists for your OS and architecture before proceeding.
2

Create workspace directories

If the workspace (default: ~/go) does not exist, igo creates it along with the downloads/, versions/, and shims/ subdirectories.
3

Write the installer lock file

igo writes ~/go/installer.lock before downloading. This prevents a second concurrent igo -i run from interfering with an in-progress installation.
4

Download the tarball

igo downloads go<version>.<goos>-<goarch>.tar.gz from go.dev/dl into ~/go/downloads/. If the file is already present, this step is skipped.
5

Extract to the versions directory

The tarball is extracted to ~/go/versions/<version>/.
6

Rename the versioned binaries

The go binary is renamed to go.<version> and gofmt is renamed to gofmt.<version> inside ~/go/versions/<version>/go/bin/. This lets multiple versions coexist without conflict.
7

Create shim scripts

igo writes shim scripts for go and gofmt into ~/go/shims/. The shims read go.mod or .go_version to resolve the correct versioned binary at runtime.
8

Create symlinks

Three symlinks are created (or replaced) in the workspace:
SymlinkPoints toEnvironment variable
~/go/root~/go/versions/<version>/goGOROOT
~/go/bin~/go/versions/<version>/go/binGOBIN
~/go/path~/go/versions/<version>GOPATH
9

Configure your shell

igo injects export statements for GOROOT, GOBIN, GOPATH, GOMODCACHE, GOOS, GOARCH, and related variables into your shell profile (.profile, .bash_profile, or .zshrc.local). It also installs an activator script at ~/.igo and prints sourcing instructions.
10

Verify the installation

igo runs go version using the newly installed binary and checks that the output contains the expected version string.
11

Write the version file

The active version string is written to ~/go/version.
12

Install extra packages

igo installs a set of extra Go tools using the new version’s binary, including govulncheck, bump, goenv, and others.
13

Lock the version directory

The version directory receives sticky and setuid/setgid bits, and a installer.lock file is written inside it. This prevents igo from modifying the directory in future runs. The workspace-level installer.lock is then removed.
The workspace-level installer.lock file at ~/go/installer.lock is created at the start of installation and removed at the end. If a lock file is already present when you run igo -i, the command exits immediately without installing. If a previous install was interrupted and left a stale lock file, remove it manually before retrying:
rm ~/go/installer.lock

Build docs developers (and LLMs) love