zsh: permission denied: /Users/macbookpro/.zshrc

Viewed 34725
3 Answers

step.1

Open your terminal.

step.2

cd ~
vim .zshrc

step.3

Pass i to insert,and insert your flutter path(/bin:/Library/flutter/bin) behind .bin:$PATH/.

If you are done, press esc and enter :wq.

example

export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH/bin:/Library/flutter/bin"

If you want to evaluate its content inside your current zsh process, you can do a

source ~/.zshrc

You need to set the execute permission on the file, as you do for any other command which you want to execute, i.e.

chmod +x ~/.zshrc

For saving time, a little bit edited answer.

Commands in the terminal

cd ~
nano .zshrc

In the editor add path to the folder, for example

path+=('/usr/local/bin/ntfy')

Save, exit. Apply changes to current terminal

source ~/.zshrc

PS Check that in the file presents a line with export.

enter image description here

Related