Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Is there a built-in text editor in the terminal on Lion?

(Like, for example, nano on Linux.)

share|improve this question
1  
umm... like vim, emacs? –  rm -rf Jun 11 '12 at 22:38
2  
@Jay Did you even try running nano in the Terminal? –  CajunLuke Jun 11 '12 at 22:43
    
@CajunLuke No, for some reason I thought it wasn't there. Oh well. –  user23741 Jun 11 '12 at 22:50
1  
I disagree with the heavy down vote penalty you've incurred. This is an easy question to answer if you have a Mac in front of you. But if you don't have a Mac at hand or don't own one yet and are wondering what the command line experience is like this is potentially useful information. Just because something seems obvious or is well known to you doesn't mean that's the case for everyone else. –  Ian C. Jun 12 '12 at 13:41

2 Answers 2

up vote 7 down vote accepted

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
share|improve this answer
    
They've been on every Mac I've ever used since the 10.2 days, and I'd be shocked if OS X had ever not included them. –  CajunLuke Jun 11 '12 at 22:42
1  
And for hard core users there is even /bin/ed :-) –  patrix Jun 12 '12 at 5:58
    
@CajunLuke: actually, nano was added in 10.4 (although pico, the editor it's based on, was in at least 10.3). I can't say for certain about emacs, but I'm pretty sure vi was there in Rhapsody Server. –  Gordon Davisson Jun 12 '12 at 6:02
    
@GordonDavisson Nano was definitely around in 10.2 and 10.3. I remember using it (and I've an old 10.3 Mac I can check on if needed). –  CajunLuke Jun 12 '12 at 13:39
    
@CajunLuke: I just checked under 10.3.9 computer (server version, but that shouldn't matter) and it has pico but not nano. I don't have a 10.2 machine handy anymore... –  Gordon Davisson Jun 12 '12 at 15:40

Yes, nano and vim for example are installed with Mac OS X.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.