This repository provides simple scripts to install and uninstall Go (Golang) on your linux system.
install.sh
: A script to download and install Go.uninstall.sh
: A script to remove Go from your system.
To install Go follow these steps:
- Clone the repository:
git clone <repository-url> cd <repository-directory>
- [OPTIONAL] Set
GO_TAR_URL
if you want to install a specific version. If NOT set it will install the latest version.export GO_TAR_URL=<SPECIFIC_GO_RELEASE_TAR>
- Run the install.sh script to install:
./install.sh
To remove Go, you can run the uninstall.sh script:
- Run the uninstall.sh script:
./uninstall.sh
-
Permission Issues - You may need to run the script with sudo if you encounter permission errors while installing Go.
-
Path Issues Make sure to modify the script to use your preferred start-up file. Examples:
~/.bashrc
,~/.bash_profile
, or~/.zshrc
# Specify bash source file to add Go environment variables BASH_SOURCE=<YOUR_STARTUP_FILE>