Here is the very basic usage guide on vi editor.
vi editor starts in “command mode”
To start editing press ‘i’
after reaching the place where editing needs to be done.
To exit “insert mode” press “Esc”.
To just save file press :w (in command mode only)
Now to quit file (in command mode only):
1. :q – quit file without saving
2. :wq – save and quit
3. :q! – force quit without saving changes
4. :wq – force save and quit
Get familiar with command line. Enjoy Linux.