Help to resolve

The following assume that your shell is bash

echo 'export GOPATH=$HOME/go' >> ~/.bashrc
echo 'export GOROOT=/usr/local/go' >> ~/.bashrc
echo 'export PATH=$PATH:$GOPATH/bin:$GOROOT/bin' >> ~/.bashrc
echo 'export GO111MODULE=auto' >> ~/.bashrc
source ~/.bashrc

what if using from ubuntu terminal

Hi @virendra ,

You can set environment variables by appending it to the specific profile files your shell use, such as ~/.bashrc for bash. Or, you can also append it to the ~/.profile in general.