Skip to main content
Post Closed as "Needs details or clarity" by mmmmmm, nohillside
added 2 characters in body
Source Link
user3439894
  • 59.8k
  • 10
  • 112
  • 135

(FYI: The OS is macOS Big Sur (11.6))

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:

1. Edit ~/.zshrc:

  1. 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.
  2. Edit /etc/zshrc:

    This worked, until the computer restarted and resets the file.

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 writingWhat is the correct way to deal with this? (similar problem happens when trying on .zshenv

2. Edit /etc/zshrc

This worked, until the computer restarted and resets the file.

What is the correct way to deal with this? Thank you very much! N.B.: I'm running macOS Big Sur 11.6.

(FYI: The OS is macOS Big Sur (11.6))

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:

1. 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

2. Edit /etc/zshrc

This worked, until the computer restarted and resets the file.

What is the correct way to deal with this? Thank you very much!

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:

  1. 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.
  2. 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.

Source Link

Permanently change zsh environment variable on macOS Big Sur?

(FYI: The OS is macOS Big Sur (11.6))

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:

1. 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

2. Edit /etc/zshrc

This worked, until the computer restarted and resets the file.

What is the correct way to deal with this? Thank you very much!