ubuntu vi how to save and exit code example
Example 1: vi save and exit
//Save
:w
//Exit
:q
Example 2: close vim
wq – Save the file and exit Vim
Example 3: vi write and exit
wq // write and quit
//Save
:w
//Exit
:q
wq – Save the file and exit Vim
wq // write and quit