Home > Mobile >  Mac `zsh: command not found: psql`
Mac `zsh: command not found: psql`

Time:11-07

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

#psql
export "PATH=/Applications/Postgres.app/Contents/Versions/14/bin:$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?

CodePudding user response:

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.

  • Related