Install go on ubuntu 18.04 from terminal

Jimmy (xiaoke) Shen
1 min readSep 15, 2020

Download and install

wget https://golang.org/dl/go1.14.6.linux-amd64.tar.gz
tar -xvf go1.14.6.linux-amd64.tar.gz
sudo mv go /usr/local

Set path

vi ~/.bashrc

Add the following at the end of the ~/.bashrc file

export GOPATH=$HOME/workexport PATH=$PATH:/usr/local/go/bin:$GOPATH/bin

Then run

source ~/.bashrc

Verify installation

If everything is correct, you will get

jimmy@jimmy-ubuntu:~$ go versiongo version go1.14.6 linux/amd64

--

--