Are there scenarios where vi is the only option to create, edit or modify a file in an Ubuntu environment?
My question is basically to really know if there is such a case where I would be forced to use vi because it would be the only option available in a particular case in the Ubuntu ecosystem.
Could a particular case exist where I somehow would not have access to other options like nano, pico or simply sending the information with tools like cat, sed, tee and more?
I would assume this is more of a server or cloud side since on the Desktop there are many more options, but from anybody that uses the terminal a lot I ask:
Is there such a case?


visudocan use any editor. Since its default configuration on Ubuntu respects theEDITORandVISUALenvironment variables, you can runsudo env VISUAL=emacs visudofor emacs or evengksudo env VISUAL=gedit visudofor a graphical editor like Gedit. (sudo -Horsudo -imay be used in place ofgksudo.) I suggest thisenvway asVISUAL=emacs sudo visudowon't work (sudoresets most of the environment) andsudo -EHmight be considered inadvisable. – Eliah Kagan Aug 28 '14 at 01:13cat?sed? Really?vireally is not that complicated, and if you really cannot be bothered to learn it, you only have to remember two modes (Normal and Insert mode). You move the cursor with arrows (or HJKL if not available), press "i" to start editing (insert mode). Once you are done, press "Esc" to go back to normal mode. Type ":wq" to save and quit (Write + Quit). – sleblanc Aug 28 '14 at 02:34vi, so other editors aren't installed and he/she refuses. I've been told to suck it up and learnviby system admins from amateurs through HPC experts. (And for that matter, to usecshinstead ofbashbecause they didn't want to write their custom environment scripts again). – tpg2114 Aug 28 '14 at 03:33sudoaccepts environment variables directly before the command thatsudois to run, likesudo VISUAL=emacs visudo. There is no need (in this case) to useenv. – Jonathan Callen Aug 29 '14 at 23:49gksu/gksudodoes not accept this syntax, however.) – Eliah Kagan Aug 29 '14 at 23:52