The VI editor is screen-based editor used by many Linux users. The VI editor is designed through C programming and it is useful to aid programmer.
To start using the vi editor, simply type “vi” from the terminal and this will allow you to enter the vi editor. If you are opening a file, you shall see the status as below.
“filename” 1 lines, 1 characters
If you are creating a new file, you will see the following status.
“filename” [New file]
To exit from vi editor, you should press Esc or ^] (control + ]) then enter :q to exit. Sometimes, you have modified something but do not want to save it, you may use :q! command.
If you have modified some script and want to save it, use :wq to save it or you may use the short-cut key of ZZ.