Ulysse
Ulysse

Reputation: 113

How does one locate a .zshrc file?

I used Homebrew to install Z shell (zsh) 5.0.7 on my Mac.

For the life of me, .zshrc is nowhere to be found. It is not in ~. Is is not in /etc or /etc/zshrc as they suggest here: http://zshwiki.org/home/config/files

Am I supposed to create it myself?

Upvotes: 11

Views: 47748

Answers (5)

Adesh Khanna
Adesh Khanna

Reputation: 242

In Unix based systems, touch command followed by name will create an empty file in the present directory.

the modification and access time of each file is also updated with the use of touch command.

In your case, to create .zshrc file, you can use the touch command as :

$ touch ~/.zshrc

Upvotes: 0

Rishabh Agrawal
Rishabh Agrawal

Reputation: 2106

As kyranjamie mentioned, you can create it using following command

$ touch ~/.zshrc

Example content of .zshrc file:

PATH=$PATH:/your_path_goes_here

Upvotes: 1

RachJain
RachJain

Reputation: 303

In order to find any file on a Unix-based system, you can try the command:

$ locate filename

It should list all the paths where the corresponding file exists.

Upvotes: 0

Brent Briggs
Brent Briggs

Reputation: 73

You can run the helper script zsh-newuser-install from the prompt, and it will walk you through the process to create an initial .zshrc in your home directory.

Upvotes: 3

kyranjamie
kyranjamie

Reputation: 1044

Sure. If it's not there already, create it yourself.

$ touch ~/.zshrc

Upvotes: 19

Related Questions