> ## Content Index
> Fetch the complete content index at: https://til.codes/llms.txt
> Use this file to discover other available public pages before exploring further.

# SET GOPATH environment variable on Ubuntu?
- URL: https://til.codes/how-do-i-set-the-gopath-environment-variable-on-ubuntu/
- Published: 2015-07-17T15:36:11.000Z
- Updated: 2015-07-17T15:41:40.000Z
- Author: Manu Ajith
- Tags: shell, go, go-lang, ubuntu, #Import 2024-07-13 21:01

Just add the following lines to `~/.bashrc`

```
export GOROOT=/usr/lib/go
export GOPATH=$HOME/go
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin

```