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.
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