Reputation: 68
I am trying to append the go lang path to my path variable. So far, I have been successful in doing this directly through the terminal with the following command:
export PATH=/path/to/go:$PATH
However when I add this line to my .zshrc, it does not seem to append to the variable. I have tried restarting the terminal, manually sourcing the .zshrc, and using this format for adding to the path:
path+=/path/to/go
export PATH
None of these have worked as expected. As mentioned before, when I do this through the terminal, it works fine, but I want this to be a persistent setting. Any help/input is appreciated.
Upvotes: 0
Views: 6712
Reputation: 31
It worked for me when I put the line directly beneath the first commented section:
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
export PATH=/usr/local/sbin:$PATH
Upvotes: 3