Mac `zsh: command not found: psql`

I already added the path to the .bash_profile like this.

export "PATH=/Applications/$PATH"

And I successfully ran psql after I do source .bash_profile.

The problem is that when I closed the terminal and reopen it, psql doesn’t work. I have to source .bash_profile again. How can I fix it?

>Solution :

That is because you are editing .bash_profile and using zsh.

If you to fix the problem, please edit .zshrc. Or alternatively, you can edit .profile and it will work when you use both bash and zsh or any other shell that of your choice.

Leave a Reply