MacOS Terminal – Built-in Text Editor macosterminal Is there a built-in text editor in the terminal on Lion? (Like, for example, nano on Linux.) Best Answer vim, emacs, nano and pico are all available by default with OS X 10.7.4: /Users/ian > which nano /usr/bin/nano /Users/ian > which vim /usr/bin/vim /Users/ian > which emacs /usr/bin/emacs > which pico /usr/bin/pico Related SolutionsHow to make a terminal alias that edits root owned files in a GUI text editor sudo and open provide all the functionality already for editing files of other users so you can just run SUDO_EDITOR="open -FWne" sudo -e /etc/hosts to edit /etc/hosts. Make sure to quit Textedit at the end (Cmd-Q) because otherwise sudo won't notice that you're done with editing. To make life easier add the following to your .bashrc (or .alias if you have it) alias sudoedit='SUDO_EDITOR="open -FWne" sudo -e' plist Files – Troubleshooting Opening Issues on macOS plist files are not necessarily plain text so they need to be run through a converter. Finder and Xcode (which has a plist editor) do this without telling the user The binary format is documented in this C code so any application can convert it and someone has written a format description in English and more Apple documentation here but note that it references old paths in /Developer/Documentation The command line program plutil can convert to and from XML e.g. to view a binary property list in XML format on stdout: plutil -convert xml1 -o - <file name> Also to convert a binary to a XML plist in place and then leave it so that the user program can read either. plutil -convert xml1 <file name> Related QuestionMacOS – 2 Column Text plain text or markdown editorMacOS – Terminal: how to make tab notify somehow when new text receivedMacOS – Python script executable opened by text editorMacOS – kate editor with built-in terminalSimple Console Editor for OS X TerminalHow to Change the Default Text Editor in Terminal on macOSMacOS – restore last session of the text editor
Best Answer
vim, emacs, nano and pico are all available by default with OS X 10.7.4: