I am using zsh and I wanted to modify the $PATH variable permanently. I can't seem to find either .zshrc or .zsh_profile on my computer -- I tried searching in Finder with enabled hidden files.
I tried creating .zshrc in my home folder. Here is the full text of what I pasted there.
/Users/dnes/Library/Python/3.9/bin
I then made this file executable. Here is what I now see when opening Terminal:
Last login: Wed Sep 27 20:30:43 on ttys000
/Users/dnes/.zshrc:1: permission denied: /Users/dnes/Library/Python/3.9/bin
dnes@MacBook-Air-Denis ~ %
I also tried echo $ZDOTDIR to see where the file is. But the command only produced a blank line. Meanwhile echo $PATH produces a normal string of few paths divided by : as one normally expects.
I know that for one Terminal session I can use export $PATH. How do I nowadays modify my $PATH variable permanently?
.zshrcfile:export PATH=/Users/dnes/Library/Python/3.9/bin:$PATH. – John Palmieri Sep 27 '23 at 18:16