go Verified current stable Not installed? Programming

Go / Show All Go Environment Variables

Show All Go Environment Variables

Use the `go env` command to list all environment variables related to your Go installation.

$
Terminal
go env

When To Use

Validating the Go environment setup prior to dependency management.

Terminal Output

Expected runtime feedback

Simulated preview
>
Output
GO111MODULE="on"
GOBIN=""
GOCACHE="/home/user/.cache/go-build"
GOENV="/home/user/.config/go/env"
GOPATH="/home/user/go"
GOROOT="/usr/local/go"
GOOS="linux"
GOARCH="amd64"

Command Breakdown

What each part is doing

go
Base Command
The executable that performs this operation. Here it runs Go before the shell applies any redirect operators.

How To Run

Execution path

  1. Step 1

    Open your terminal.

  2. Step 2

    Run the command `go env`.

  3. Step 3

    Review the output for environment variable settings.

Alternative Approaches

Comparable commands in other tools

Alternative programming tools for the same job.