After installing the compiler you need to configure
GOPATH environment variable.
Since Go 1.8, the
GOPATH environment variable has the default value of
$HOME/go, so you can skip setting it.
Create the go directory with
Add the following two lines at the end of your
export GOPATH=$HOME/go export PATH=$GOPATH/bin:/usr/local/go/bin:$PATH
$ source ~/.bashrc
Test the setup by running
You should understand the effect of GOPATH.