Installing golang on ubuntu 20

Installing golang on ubuntu 20

Instructor-svgAl-Mamun Sarkar
Aug 31 , 2020

In this lesson, I will show you how to install golang on your ubuntu computer. 

Open your Linux terminal and run the following command.

sudo apt-get update

 

Download the latest version of golang from the following link.

https://golang.org/dl/

 

Go to download location and open terminal there and run the following command. Use your downloaded file's name instead of go1.15.linux-amd64.tar.gz

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

 

Now you can run go command to test installation. It will return golang version.

/usr/local/go/bin/go version

 

Add go path go .profile to access go command directly.

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

 

Reload .profile 

source $HOME/.profile

 

Now you can use go command directly. Now you can check golang version by running the following command on the terminal.

go version

 

  • Share On:
  • fb
  • twitter
  • pinterest
  • instagram