Melhttps://unixcop.com
Unix/Linux Guru and FOSS supporter

How to install go Programming Language on Ubuntu 20.04

What is Go Programming Language?

Go is a compiled, statically typed programming language developed by Google.

Follow the steps below to install Go on Ubuntu

Step 1: Downloading Go binary files

Use curl or wget to download the current binary for Go from the official download page.

curl -O https://storage.googleapis.com/golang/go1.13.5.linux-amd64.tar.gz

Step 2: Extracting from the tar.gz file

Next, use tar to unpack the package. The following command will use the tar tool to open and expand the downloaded tar.gz file and to create a folder of the package name:

tar -xvf go1.13.5.linux-amd64.tar.gz

Then, move the folder to /usr/local.

sudo mv go /usr/local

The Go package is now in /usr/local, which makes sure that Go is in your $PATH for Linux.

Step 3: Setting paths

set the path using following command

sudo vi ~/.profile

copy and past following line in the above file

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

Save the file using following command

source ~/.profile

Step 4 – Now verify go installation using following command

go version

Thanks for reading if you have any question ask in a comment

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest articles

x