Is there a built-in text editor in the terminal on Lion?
(Like, for example,
nano on Linux.)
Stack Exchange network consists of 181 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.Visit Stack Exchange
Ask Different is a question and answer site for power users of Apple hardware and software. It only takes a minute to sign up.Sign up to join this community
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
/bin/ed:-) Jun 12, 2012 at 5:58
ed has not been mentioned yet, even thought I'd choose to use
nano over it and the others mentioned, let me offer it as an addition to the cumulative list.
The manual page for
The ed utility is a line-oriented text editor. It is used to create, display, modify and otherwise manipulate text files.
The ed utility does not recognize multibyte characters., so it's use may be rather small nowadays. Sep 30, 2017 at 8:56
Since this question is about "built-in" editors "like" nano, this question needs an updated answer:
pico is just a symlink to nano,
vi is actually vim as is
ex and not counting
xargs, constructions and the like, thats about it, since ed is indeed present but very unlike nano (depending on the definition of "editor").
Three CLI text editors (like nano) are present in the default of Sierra:
nano (installed: 2.0.6, current: 2.8.7. "Of course, you should always check the nano homepage to see what the latest and greatest version is.")
GNU nano is designed to be a free replacement for the Pico text editor, part of the Pine email suite from The University of Washington. It aims to "emulate Pico as closely as possible and then include extra functionality".
vim (installed: Vi IMproved 7.4, current: "Vim 8.0 is the latest stable version")
Vim is a highly configurable text editor built to make creating and changing any kind of text very efficient. It is included as "vi" with most UNIX systems and with Apple OS X.
emacs (installed: GNU Emacs 22.1.1, current: "Emacs 25.3 − latest release Released September 11, 2017 Emacs 25.3 fixes a significant security hole.")
An extensible, customizable, free/libre text editor — and more.
In addition to ones listed above there is also xedit. It's opened from the terminal by just typing xedit. Opens an editor window where you can edit a file with keyboard and mouse.
xeditrequires XQuartz/X11 to be installed (and that launching X11 just to edit a file might be kind of overkill). Oct 2, 2017 at 17:58
Yes, nano and vim for example are installed with Mac OS X.
nanoin the Terminal?