How To Install Golang On Your Linux System

in #golang5 years ago (edited)

Table of Contents

What is Golang
What's Special in Golang
How to Install Golang on Your Linux System
How to Update Golang

What is Golang

Golang is programming language created by robert griesemer, rob pike, ken thampson in 2007 at google.

What's Special in Golang

what is golang

Golang is statically typed language so program execution time less and it's derived from C language.

How to Install Golang on Your Linux System

what is golang

The latest stable version of golang is 1.15 and another version is 1.15.1 and now we see how to install both versions to your linux system.

First we download the linux compatible golang file from golang.org website it's official website of golang. Where you can see lots of versions of golang but we only download the latest version of golang.

Click download go 1.15 version package it's start download to your download folder.

The download finish then open your linux terminal type these commands.

tar -C /usr/local -xzf go1.14.3.linux-amd64.tar.gz

If it is not work then use sudo beginning above command

Then now you should edit your bashrc file to set environment variable

Open sudo nano /.bashrc

Place below lines to your bashrc file

export PATH=$PATH:/usr/local/go/bin/$GOPATH:bin

And now check properly installed golang on your linux

go version

You will get the current installed golang version on your screen.

How to Update Golang

what is golang

If you need to update your golang to latest version just do this you will get the latest version of golang. The current golang latest version is 1.15.1 so type this command on your terminal

go get golang.org/dl/go1.15.1

it's takes time to download the latest version then type this

go1.15.1 download

finally you updated your golang to latest version.

If you have any doubts please leave that in comment section I will be solve it.

Sort:  

Upvoted by GITPLAIT!

We have a curation trial on Hive.vote. you can earn a passive income by delegating to @gitplait
We share 80 % of the curation rewards with the delegators.


To delegate, use the links or adjust 10HIVE, 20HIVE, 50HIVE, 100HIVE, 200HIVE, 500HIVE, 1,000HIVE, 10,000HIVE, 100,000HIVE


Join the Community and chat with us on Discord let’s solve problems & build together.