Skip to content
๐Ÿ“œ A simple shell script to install the Go ๐Ÿ’™ programming language!
Branch: master
Clone or download
Fetching latest commitโ€ฆ
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Go Installer ๐Ÿน

Install Golang on Linux or Mac with hassle of environment variables setting.

How to use it ๐Ÿค”

Installing(or updating) Go โฌ‡๏ธ

You can clone the repository or just use wget to download the script


Now, You can go grab a cup of coffee โ˜•๏ธ, set back ๐Ÿ˜Œ and watch the magic happen! ๐Ÿ”ฎ

Please Note that

By default the script will create .go and go folders on your HOME directory, add the needed variables to your PATH variable.

$HOME/.go is location where Go will be installed to.
$HOME/go is the default workspace.

In order to install Go to other location or set custom workspace. You can set environment variables GOROOT or GOPATH before installing (or uninstalling) Go.

For example:

export GOROOT=/opt/go            # where Go is installed
export GOPATH=$HOME/projects/go  # your workspace

Read more about workspaces in Go.

Uninstalling Go โŒ

bash remove

How it works ๐Ÿ”ฅ

The script does the following steps:

  • checks if you have already installed Go!
  • automatically checks the installed operating system (Linux or Mac)
  • detects system architecture (armv6, armv8, amd64, i386)
  • parses the golang download page to find the latest version of Go that is available for your platform and architecture
  • in case of having already installed Go, if the latest and the current version are equal, the script exits ๐Ÿ‘‹
  • downloads the latest version
  • creates needed folders for workspace and Go binaries
  • extracts the files of the downloaded package
  • adds the binaries to PATH environmental variable



Tested by Travis โœ”๏ธ on:

  • Linux ๐Ÿง
  • Mac ๐Ÿ’ป

Tested manually on:

  • Ubuntu
  • Manjaro


MIT License

You canโ€™t perform that action at this time.