Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I know nano (and Pico!) well on *Nix systems, and don't even know how to get out of vi if it accidentally loads (though on emacs I can get that far. Questions about my intelligence aside, is it okay to expect that nano will be available on most Linux distributions I encounter?

share|improve this question
2  
I used to avoid learning vi/vim, but it's one of the best decisions I ever made. I'd recommend starting with the vimtutor command, assuming your system has vim. (I know it's there on OS X and many Linux distributions I've used. Might not be there if you're using Ubuntu, though.) –  Benjamin Oakes Feb 1 '10 at 22:12
    
@Benjamin Oakes, I know there's been a lot written about this, but please tell me what you like so much. –  Yar Feb 8 '10 at 14:29
add comment

3 Answers

up vote 4 down vote accepted

vi is part of the posix standard, so it will be present on any Unix by definition. nano will be much more iffy. All you really need to know is :q! to get the hell out if it started accidentally, and then man vi to find enough info to figure out how to use it if nothing else is availible. Also vim is not vi and you cannot take vim features for granted either.

share|improve this answer
    
cool +1 for mentioning this posix thing... I'll check it out. –  Yar Feb 1 '10 at 23:29
    
Justin, could you please put a link to the list of editors (or whatever) that are part of the posix standard? I looked around a bit and couldn't find anything definitive. Seems like emacs is also part? –  Yar Feb 5 '10 at 12:20
    
The full list of required user portable utilities: "bg ex fc fg jobs more talk vi", as specified on this page opengroup.org/onlinepubs/9699919799/basedefs/… defined by the POSIX2_UPE portion of the posix standard. emacs, sadly, is definitely not part of the posix standard, though any application can choose to implement posix guidelines for ie. how to interpet regex or command line arguments. –  Justin Smith Feb 5 '10 at 20:23
    
Thanks interesting... also interesting about vim. –  Yar Feb 8 '10 at 14:31
add comment

Nope. It isn't. "vi" on the other hand is quite likely to be there. You may find "pico" if you're lucky. How to get out of vi:

:q!

Do a regular google search, as well as an image google search, for 'vi cheatsheet'.

share|improve this answer
2  
You can also do ZZ to save&quit, which is really useful (And easier to do than :wq) –  Phoshi Feb 1 '10 at 20:06
add comment

I haven't encountered a popular distro without it. So I think it's save to assume that.

share|improve this answer
3  
It's not always there on unix. –  Rich Bradshaw Feb 1 '10 at 20:13
    
This is true about Linux, but not about Unix, seems... I agree though, it's been on every Linux distro I've seen. –  Yar Feb 1 '10 at 23:28
    
IIRC, I have seen some without nano (red hat servers, I believe), but it is rare. –  Trevoke Feb 2 '10 at 13:19
add comment

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.