In this tutorial, i will show you the 3 different ways to open and edit .zshrc file in MacOS terminal.
a) Open with Vim editor
b) Open with Nano editor
c) Open with TextEdit app
1) Open and edit .zshrc with vim editor:
VIM allows you to create and edit text files on your Mac. It is wonderful, fast and free.
Few important commands we should know to work with vim:
Type Vim <filename>
- if file does not exist then file will be created and will be opened in edit mode.
- If exist will be opened for editing.
:q — to quit
:w — write your file (i.e.: save)
:wq — write and quit (save and exit!)
2) Open .zshrc file with Nano editor:
Type command nano
-> If file does not exist then it will be created and opened in edit mode.
-> Ctrl + X -> to save changes
-> Press Y to accept changes and then press ->Enter to exit.
3) Open .zshrc file with TextEdit app:
Here you can open and edit .zshrc file with TextEdit app. We need to run following command
to open .zshrc file.
Open -a TextEdit ~/.zshrc
Then file will be opened in text editor. Then you can easily add/delete content and save file
with the help of menu options available in Texteditor app.
Please watch the below tutorial for better clarification on each step:
If you’re finding value in this tutorial, don’t forget to give it a thumbs up to show your appreciation. And hey, if you haven’t already, consider hitting that subscribe button and ringing the notification bell so you never miss out on our latest content. Your support means the world to us, and it helps us keep creating helpful tutorials just for you. Thanks for being part of our community – let’s grow together! 🚀