3

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?

2
  • 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.) Feb 1, 2010 at 22:12
  • @Benjamin Oakes, I know there's been a lot written about this, but please tell me what you like so much. Feb 8, 2010 at 14:29

3 Answers 3

7

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 out if it started accidentally, and then man vi to find enough info to figure out how to use it if nothing else is available. Also vim is not vi and you cannot take vim features for granted either.

4
  • cool +1 for mentioning this posix thing... I'll check it out. Feb 1, 2010 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? Feb 5, 2010 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. Feb 5, 2010 at 20:23
  • Note that although any UNIX will have vi since it must have SUS certification which includes the presence of vi. But it'd be possible to have a Unix-like, non POSIX compliant OS without vi.
    – jinawee
    Feb 24, 2019 at 14:29
8

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'.

1
  • 2
    You can also do ZZ to save&quit, which is really useful (And easier to do than :wq)
    – Phoshi
    Feb 1, 2010 at 20:06
1

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

3
  • 3
    It's not always there on unix. Feb 1, 2010 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. Feb 1, 2010 at 23:28
  • IIRC, I have seen some without nano (red hat servers, I believe), but it is rare.
    – Trevoke
    Feb 2, 2010 at 13:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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