Different ways to open/edit .zshrc file in MacOS terminal || Beginner's Tutorial

Опубликовано: 02 Октябрь 2024
на канале: Cool IT Help
5,480
36

In this tutorial, i will show you the 3 different ways to open .zshrc file in MacOS terminal.
a) Opening with Vim editor
b) with Nano editor
c) with TextEdit app

1) Open .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 filename
- 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.

#MacTerminal #ZshrcFile #OpenZshrc #MacOS #ZshShell #TerminalCommands #ZshConfiguration #MacOSXTerminal #EditZshrc #TerminalTips #CustomizeZsh #ShellScripting #TerminalCommands #MacDevelopment #MacProgramming #DotFiles #coolithelp #macosventura