I'm a newbie to Ubuntu. I want to add some variables to my PATH
- I am using the following steps:
Open a terminal window.
Type the following commands:
export GOROOT=/home/linux/go/hg export GOOS=linux export GOARCH=386 export GOBIN=/home/linux/go/bin export PATH=$PATH:$GOBIN
When I type the following command in a terminal window:
env | grep '^GO'
It shows:
GOBIN=/home/linux/go/bin/
GOARCH=386
GOROOT=/home/linux/go/hg
GOOS=linux
I have tried the following command in a terminal window:
gedit ~/.bashrc
and pasted the following lines at the end of the file:
GOROOT=/home/linux/go/hg
GOOS=linux
GOARCH=386
GOBIN=/home/linux/go/bin
The problem is that env
is not showing the above mentioned variables in PATH
. Perhaps I am using the wrong command to store the paths, or storing my path variables in the wrong file?
Can someone guide me where and how to store the above mentioned variables in the PATH
permanently?