2

I am trying to setup my new MacBookPro M2-Max.

I can't find the .zshrc, the only hidden files in my home folder are:

.zprofile
.zsh_history
.zsh_sessions

But no .zshrc

My OS is Ventura. Any ideas?

  • 1
    It’s not created by default. You don’t really need it as .zprofile can handle things. See https://apple.stackexchange.com/q/388622/119271 for more details – Allan Feb 16 '23 at 02:43

1 Answers1

2

As pointed out in the comment, ~/.zshrc is not created by default in macOS. However, you can create it easily enough:

% touch ~/.zshrc  

There's a nice Q&A here that summarizes one opinion of the raison d'être for the ~/.zshrc file. And there's another opinion here, which also suggests what types of configuration parameters should go into a ~/.zshrc file. You didn't ask what to put in ~/.zshrc, and I assumed the two references covered that in enough detail... but one of the comments suggested I should say something explicit.

Clearly, Apple has deemed .zshrc unnecessary, but many people use it. I keep (among other things) my HISTORY configuration there.

Seamus
  • 4,547