Location of .zshrc file

Where do I find the .zshrc file on my MacBook Pro with Big Sur?

MacBook Pro 15″, macOS 11.7

Posted on Dec 24, 2022 1:16 PM

Reply
Question marked as Top-ranking reply

Posted on Dec 25, 2022 7:54 AM

The .zshrc file is located in your home folder. Like all files whose names start with a period, it is normally hidden, so you won't see it in the Finder, or by doing a normal "ls" command in the Terminal.


You can make the Finder show hidden files by pressing Command-Shift-period (and press again to toggle this off).


You can list hidden files in Terminal with the -a option. For example:


ls -a ~


will list all the files in your home folder (including those starting with a period, like .zshrc)


Do not mess with any of these files unless you know what you are doing!


5 replies
Question marked as Top-ranking reply

Dec 25, 2022 7:54 AM in response to Garadziva

The .zshrc file is located in your home folder. Like all files whose names start with a period, it is normally hidden, so you won't see it in the Finder, or by doing a normal "ls" command in the Terminal.


You can make the Finder show hidden files by pressing Command-Shift-period (and press again to toggle this off).


You can list hidden files in Terminal with the -a option. For example:


ls -a ~


will list all the files in your home folder (including those starting with a period, like .zshrc)


Do not mess with any of these files unless you know what you are doing!


Dec 25, 2022 8:22 AM in response to Garadziva

The $HOME/.zshrc file does not exist until you create it. The dot indicates that it is a hidden file, so if you don't find it, you will have to create it in your preferred plain text editor in that specific location.


The Zsh shell uses the same PATH syntax as Bash, but uses a different Terminal prompt (PS1) syntax, so you will want to set that up too. Here are some examples of configuring the Zsh shell prompt and the Zsh prompt expansion documentation.


This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Location of .zshrc file

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.