Go Language Setup on Ubuntu

Go Language Setup on Ubuntu

In our previous post, we explained how to setup GoLang on windows system.

This post explains what all steps you need to follow to setup Go Lang in your Ubuntu system. Let's see that steps.

Step 1: Very first step is to download the installer, for that go to https://golang.org/ site. Click on "Download Go" button and that should take you to next page.

Go Lang Windows Installation

Go Lang Ubuntu Installation

Step 2: Click on Linux tar file which is Linux installer and that should download the installer for you.

Go Lang Installer

Step 3: Now let's first untar the downloaded file. Since the file is downloaded in Downloads folder so first you need to go to that folder and then run below command.

sudo tar -xvf go1.13.4.linux-amd64.tar.gz

Step 4: You should be able to see newly created "go" folder under Downloads folder.

Step 5: Now move the go folder from Downloads to /usr/local folder using below command.

sudo mv go /usr/local

Step 6: Now next step is to set GOROOT and for that run below command.

export GOROOT=/usr/local

Step 7: Next step is to update the PATH, for that use below command.

export PATH=$PATH:$GOROOT/bin

Step 8: Now you need to set GOPATH but that is required when you start developing your project in Go Language. This can refer to any location where you want to store you project.

export GOPATH=$HOME/goProject

You also need to update the PATH also.

export PATH=$PATH:$GOPATH/bin

Step 9: To verify the installation or setup, run below command and that should return Go version.

go version

No Comments

Post a Reply

Inquire Now
close slider