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.
Step 2: Click on Linux tar file which is Linux installer and that should download the installer for you.
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.
Step 7: Next step is to update the PATH, for that use below command.
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.
You also need to update the PATH also.
Step 9: To verify the installation or setup, run below command and that should return Go version.