export GOPATH=$HOME/go export PATH=$PATH:$GOROOT/bin:$GOPATH/bin code example
Example: how to set gopath/bin linux
## open your favorite code editor
vim ~/.bashrc
## paste this sample code like this
export GOPATH=$HOME/go
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
## after changes file .bashrc and saved changes
source ~/.bashrc
## and close your terminal and open again
## success and this work
## test get package from internet
go get github.com/codegangsta/gin
gin --help