Search code examples
macoszsh

MAC and ZSH - Export not "sticking"


So, I just installed bombardier and when I call it, it was saying "not found"... so I found that if I ran

export PATH=$PATH:/usr/local/go/bin
export GOPATH=$HOME/go;
export PATH=$PATH:$GOPATH/bin;

it would work...

but when I open a new terminal tab, guess what? bombardier is not found again and I have to re-export. what should I do? I read about .zsh, .zshrc and what-not files but couldn't find any of these. I could only find .zprofile and .zsh_history and a .zsh_sessions folder


Solution

  • … when I open a new terminal tab…

    Exported variables set in a shell are exported to processes created by that shell. A shell in a new terminal window is created by the Terminal application. It starts a new shell from scratch.

    I read about .zsh, .zshrc and what-not files but couldn't find any of these.

    You are supposed to make them. Create a new file in your home folder named .zshrc and put the commands into it.