How To Open A File Using Text Edit In Terminal in MacOS

Viewed 10154

Another small question. I just recently migrated to ZSH and, so far I am loving it! My question is how can I open a file using TextEdit so that I can edit it using a GUI? Make no mistake, Vim is an amazing command-line tool for editing files in the terminal along with nano.

Let's say that I wanted to open the .zshrc using vim :

vim ~/.zshrc

In the same way, open the .zshrc using nano:

nano ~/.zshrc

How can I open the same ~/.zshrc file using text edit through the terminal?

Thanks a lot and I really appreciate your help :)

2 Answers

Here is the solution, I know it's a bit tedious but, you can open the ~/.zshrc using this command :

open -a TextEdit ~/.zshrc

Text Editor (gedit) is the default GUI text editor in the Ubuntu operating system. To open a specific file: gedit filename To open multiple files: gedit file1 file2 Here's More Information

Related