How to Install Go in Alpine Linux?
Last Updated :
29 Oct, 2021
Go is expressive, concise, clean, and efficient. Its concurrency mechanisms make it easy to write microservices, while its novel type system enables flexible and modular program construction. Go compiles quickly to machine code yet has the convenience of garbage collection and the power of run-time reflection. It’s a fast, statically typed, compiled language that feels like a dynamically typed, interpreted language. In this article, we are going to see how we can install Go in our Alpine Linux.
System Configuration:
To display the detailed information of our system, we are going to use a tool called neofetch:
apk add neofetch
Run the following command to execute neofetch:
neofetch
Neofetch output
Installing Go on Alpine Linux:
Step 1: Download the Go binary by running the following command:
wget https://golang.org/dl/go1.17.2.linux-amd64.tar.gz
Downloading go
Step 2: Unzip the binary and move the archive into /usr/local .
tar -C /usr/local -xzf go1.17.2.linux-amd64.tar.gz
Step 3: Add the go bin path to the terminal environment.
export PATH=$PATH:/usr/local/go/bin
Step 4: To verify the installation, run the following command:
go version
go installed
Share your thoughts in the comments
Please Login to comment...