I want to make aliases for my iterm2 so i tried to edit the .zshrc file.

But the problem is for some reason i can't save the file, it gives me

 unable to save .zshrc

I also tried to set alias straight from console and it works, but it can only be used in that current iterm session.

I use iterm2 and oh-my-zsh


That's usually a permissions problem. You are attempting to save a file which may be

  • read-only
  • owned by some other user
  • stored in a directory to which you have no write-permission

There's not enough information in the question to be more specific. But a usual pitfall lies in copying files (or directories) as root (which makes them owned by root) and attempting to edit them as a non-privileged user.

  • To answer some of your suggestion: I changed the file permission using chmod but has no effect, and my mac only has one user. I am new to mac (windows user before learning programming) so any tips as to how I can try to solve this problem? Feb 20 '17 at 4:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.