Add required paths to the PATH environment variable
by inserting the lines below in your /etc/profile
file for a system-wide installation or $HOME/.profile
or $HOME./bash_profile
for user specific installation:
Using your preferred editor, open the appropriate user profile file as per your distribution and add the lines below, save the file and exit:
export GOPATH="$HOME/go"
export GOBIN="$GOPATH/bin"
export PATH="$PATH:/usr/local/go/bin"
export PATH="$PATH:$GOBIN"
The final step under this section is to effect the changes made to the user profile in the current bash session like so: