The Linux vi editor is a tool to edit files in the Linux command line terminal. It has been a popular text editor to edit server configuration files and programs for so long. Almost all Linux distributions include vi editor in default installation.
I'm new to Linux, things like save and exit in a text editor may seem for linux users as easy as not worth mentioninig.
I was put in the situation to edit a file, save and exit the program. All good, type what you want, navigate inside the file with arrows, etc. When to save, you have to do it with a combination of keys, but what combination? More, all the commands I tryed, they just apear in my file...
I searched the internet, there is nowere I cand find just that information. I have to read and compile from FAQ's, Documentations.
First, I find that the editor is VI, and there is
Command mode & Insert mode
In the insert mode, one can write, and in command mode, one can issue commands.
ESC will take one out of insert mode and return one to
ZZ is the Exit and save command
Easy? After 3 hours of searching and reading on the internet is easy for me too.