install golang
- Open your terminal and navigate to your downloads folder
cd /root/Downloads
- Extract the files
tar -C /usr/local/ -xzf go1.13.6.linux-amd64.tar.gz
- Add variables for GO by modifying “~/.bashrc”
vim ~/.bashrc
Add the following paths to the end of the fileexport GOPATH=/root/go-workspace
export GOROOT=/usr/local/go
PATH=$PATH:$GOROOT/bin/:$GOPATH/bin - Now we need to refresh the bashrc to get the updated variables
source ~/.bashrc
Comments
Post a Comment