I tried to customize the ZSH terminal shell (e.g. prompt, auto-completion behavior) by editing the ZSH files, but failed. I have tried both the following, and none worked:
- Edit
~/.zshrc
:
When I tried to edit the (blank) file (even under the sudo command), I got the following error message: ".zshrc" E166: Can't open linked file for writing (similar problem happens when trying on.zshenv
. - Edit
/etc/zshrc
:
This worked, until the computer restarted and resets the file.
What is the correct way to deal with this?
N.B.: I'm running macOS Big Sur 11.6.
ls -l ~/.zshrc
show?