Skip to main content

Go Binaries in PATH

To run binaries installed with go install, you'll need to add Go's binary directory your shell's search path.

Run the following command to add the Go binary directory to your PATH:

export PATH=$PATH:$(go env GOPATH)/bin
info

Add the command to your shell's configuration file (for example, ~/.zshrc, ~/.bashrc, etc.) to make the change permanent.

echo 'export PATH=$PATH:$(go env GOPATH)/bin' >> ~/.zshrc