If you are using the Zsh shell, the default shell for Mac since the release of macOS Catalina, and trying to locate the .zshrc file, you must first know that this file is not created by default, you need to create one, if you think you already created one and want to locate it, here is how you can do that,
✌️ Note: If you install Oh My Zsh the zshrc file is auto-created.
How to locate the user level .zshrc file?
- Open Spotlight Search,
- Type Terminal and open it,
- Now type cd ~ to move to your user folder,
- Type ls -a, to see all the files (-a option to see hidden files),
- You should be able to see the .zshrc file, if not you do not have it
You can type just one command to view the files content,
% cat ~/.zshrc
If the file is not present you will get the below error!
cat: /Users/code2care/.zshrc: No such file or directory

An easy way to create and add text to the file is by nano (or vi) text editor nano ~/.zshrc
✌️I changed the prompt of Zsh from % to an emoji: 🦋, if you would like to do something similar follow the article: https://code2care.org/zsh/how-to-set-an-emoji-as-zsh-terminal-prompt-macos
Below is a ls command piped with grep tp see all the hidden .zsh files on a Mac using Terminal command.
% ls -la | grep '\.zsh.*'
-rw-r--r-- 1 code2care staff 38 Mar 12 2022 .zprofiley
-rw-------@ 1 code2care staff 21198 Oct 10 13:29 .zsh_history
drwx------ 43 code2care staff 1376 Oct 12 17:34 .zsh_sessions
-rw-r--r-- 1 code2care staff 29 Jun 27 22:48 .zshenv
-rw-r--r-- 1 code2care staff 266 Sep 11 16:39 .zshrc
-rw-r--r-- 1 code2care staff 42 Jan 26 2022 .zshrcy

How to locate the system level .zshrc file?
You can find the system level .zshrc file where all the system's configuration files live i.e. the /etc
- Open Mac Terminal,
- Move to /etc directory: cd /etc
- You will find a zshrc file here (this is not a hidden file),
- Open this file using nano or vim editor: vi zshrc

Note: If you make any changes in the /etc/zshrc file, the changes will be applied to all users on the Mac even if the .zshrc file is not available for any user or now.
Facing issues? Have Questions? Post them here! I am happy to answer!
- Clear Screen shortcut macOS Terminal
- What is macOS Ventura?
- [fix] How to Show file extensions on all files on Mac
- How to Find Where Mac Terminal App is Located?
- AutoSave button not working on Office on Mac (Word, Excel or Powerpoint)
- macOS say command text to speech using various voices and languages
- How to change Ping TTL value on macOS
- Open .bash_profile File in TextEdit using Terminal
- How to know the Safari Version on Mac
- How to Copy full Absolute Path of a File on Mac
- 13.0 MacOS Ventura release date
- Enable spell check in Sublime Text (macOS)
- How to Display Analog Clock on Mac Menu Bar
- How to turn off Location Services macOS Ventura 13
- How to Open VS Code on Mac
- Add Bookmark macOS Safari
- How to Fix cd: too many arguments Error in Terminal: A Step-by-Step Guide
- How to install wget on macOS
- Select Line Number TextEdit on Mac
- Strikethrough Text in Excel for Mac
- How to Enable or Disable Dark Mode on macOS Ventura 13
- How to hide or display Wifi icon in macOS Bug Sur Menu Bar
- How to install Yarn on Mac (macOS)
- How to fix command not found brew (bash, zsh) on macOS Terminal
- How to Schedule Mails in macOS Ventura
- Pdf Text to Speech option in Mac OS X Preview App - Mac-OS-X
- Your JBoss Application Server 7 is running However you have not yet added any users to be able to access the admin console - Java
- ls command to list only directories - Linux
- How to hide or disable iOS 14 App Library on iPhone? - Apple
- How to Change Background/Foreground Color to Vim - Linux
- How to Show Commit Date in Eclipse Git History Details - Git
- Setting and Updating AWS CLI Configuration - AWS
- Spring Boot + Redis Cloud Configuration and Setup Tutorial - Java