

The process to be followed for Windows is pretty much the same. Note that you don't need any special editors or IDEs to work with Go. With that you should now be ready to compile and run your go programs. bashrc if required so that the environment variables are available in your current shell, or restart the shell. bashrc, export GOROOT=/home/vj/coding/golang/go and export GOPATH=/home/vj/coding/golang/gopath The Go tools will have use for this path later to download and install external packages.

: The name of the environment variable you want to add a new value to.The export command also allows you to add new values to existing environment variables: export =:$ : The value you want to assign to the new variable.: The name for the new temporary environment variable you want to set.This is useful for variables you need to use for one session only or to avoid typing the same value multiple times.Īssign a temporary environment variable with the export command: export = The value you assign to a temporary environment variable only lasts until you close the terminal session. Note: Always use the $ prefix when specifying a variable name.
