Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Editing the ~/.zshrc file

I'm a complete newbie, so I think I'm just missing a step, but have no idea.

I'm following tutorials for Rails. Lots of steps say, "and then editing the ~/.zshrc file." but I don't have any ~/.zshrc file. I'm looking at the folders in Sublime. Also none of the following ~/.zprofile, ~/.zlogin, ~/.zlogout exist. Though, under my home files, there is .zprezto folder. No zshenv either...

Do I just create the files? Seems like they should be downloaded from somewhere. I'm using Terminal with OS X. So lost.

echo 'write whatever' >.zshrc

Thanks in advance!

like image 497
k.Rox Avatar asked Mar 22 '16 14:03

k.Rox


2 Answers

You will get ~/.zshrc file only when you use zsh shell on your Mac OS. If you're not sure which shell you're using, open terminal and issue the following command.

echo $SHELL

if you get response like /bin/zsh then you're using zsh shell on your Mac. You can edit ~/.zshrc file using vim editor on your Mac which is the default for Mac OS.

to open ~/.zshrc file using vim editor, issue the following command on your terminal.

vim ~/.zshrc

Then you can do any configurations you need. Or else you can use open -t .zshrc command to open ~/.zshrc file from your general TextEdit on Mac OS.

like image 102
Randil Tennakoon Avatar answered Oct 22 '22 17:10

Randil Tennakoon


  1. $ open ~/.zshrc
  2. Make changes in the .zshrc file window that opens
  3. Save file
  4. $ source ~/.zshrc
like image 43
Gwen Au Avatar answered Oct 22 '22 19:10

Gwen Au