Linux (using yum for CentOS/RHEL and apt for Debian/Ubuntu)

Using yum (CentOS/RHEL):

  1. Install Go using yum:

      sudo yum install golang
      
  2. Verify the installation:

  go version
  

Using apt (Debian/Ubuntu):

  1. Update the package index:
  sudo apt update
  
  1. Install Go using apt:
  sudo apt install golang
  
  1. Verify the installation:
  go version
  

Windows

  1. Download the installer:

  2. Run the installer:

    • Double-click the downloaded .msi installer file and follow the on-screen instructions.
  3. Set up environment variables:

    • Go should automatically add itself to the PATH during installation.
  4. Verify the installation:

    • Open Command Prompt or PowerShell and type:
  go version
  

macOS

  1. Install Go using Homebrew (optional):

    • If you prefer using Homebrew, run:
  brew install golang
  
  1. Download the macOS package:

    • Visit the official Go website and download the macOS package.
  2. Run the package installer:

    • Double-click the downloaded .pkg file and follow the on-screen instructions.
  3. Verify the installation:

    • Open Terminal and type:
  go version