Golang on Linux... How to install it?

0 votes
Hello, I want to install Golang on my ubuntu machine using terminal. Please suggest how can I do it?
Mar 1 in Others by Abhi
57 views

1 answer to this question.

0 votes

Hey @Abhi, if you want to install Golang on Ubuntu, follow these steps one by one:

1. Download the latest binary for Go using curl command:

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


2.  Now verify the .tar file using following commands,

>>sha256sum go1.9.3.linux-amd64.tar.gz

3. Then use this command to extract the .tar file:

>>tar -xvf go1.9.3.linux-amd64.tar.gz

4. Now move the Go directory to usr/local using following command:

>>sudo chown -R root:root ./go
>>sudo mv go /usr/local

5. Finally, adjust the Path Variable using .profile/ file and save it;

>>export GOPATH=$HOME/go
>>export PATH=$PATH:/usr/local/go/bin:$PATH/bin
>>source ~/.profile

6. And you have successfully installed golang on your machine. To check write the following command in terminal: 

>>go version


 

answered Mar 1 by Anvi
• 10,670 points

Related Questions In Others

0 votes
1 answer

How do I install Ruby on Rails?

Hi @Anvi, what @Pratibha has mentioned is ...READ MORE

answered Feb 28 in Others by Abha
• 16,900 points
33 views
0 votes
1 answer

How to install C#

Hi @Akanksha, C# is a programming language ...READ MORE

answered Feb 28 in Others by Pratibha
• 2,740 points
28 views
0 votes
1 answer

What is a name function in JavaScript & how to define it?

A named function declares a name as ...READ MORE

answered Mar 6 in Others by Frankie
• 9,810 points
23 views
0 votes
1 answer

How to unistall a file in Linux?

You can uninstall a file using the ...READ MORE

answered Mar 8 in Others by Nabarupa
46 views
0 votes
1 answer
0 votes
1 answer

Install postgreSQL on Ubuntu

Installing PostgreSQL on Ubuntu is very simple, ...READ MORE

answered Mar 22 in Database by Nitesh
28 views
0 votes
1 answer

How do I set variable if a specific package version is installed in CFEngine?

Here is what you can do.Just use packagesmatching to ...READ MORE

answered Jul 12, 2018 in Other DevOps Questions by Atul
• 10,240 points
65 views
0 votes
1 answer

Install Python on Ubuntu

@Abha you are right about pre-installation of python, ...READ MORE

answered Mar 1 in Python by Pratibha
• 2,740 points
32 views
0 votes
1 answer

How to do Installation of Ruby on Rails on Linux (Ubuntu)?

Hi Pratibha, installing ROR on ubuntu is ...READ MORE

answered Mar 1 in Others by Anvi
• 10,670 points
44 views
0 votes
1 answer