Which of the following commands does not save changes before exiting from the VI editor?

Which of the following commands does not save changes before exiting from the VI editor?

Which of the following commands does not save changes before exiting from the VI editor?

A.
:q!

B.
:q

C.
zz

D.
:w

Explanation:

The :q! command is used to quit from the VI editor without saving.
What is VI?
The VI is a visual interactive text editor that allows a user to create, modify, and store files on a
Linux computer. It works in the following modes:
Command: This is the default mode of the command. Various commands can be used in this
mode to manipulate the opened text.
Input: In this mode, a user can insert text directly in the text screen area.

Answer option D is incorrect. The :w command is used to write the file.
Answer option C is incorrect. The zz command is used to save the file and quit. This is the easiest
way to leave the editor, with only two keystrokes.
Answer option B is incorrect. The :q command is used to quit after saving the file.



Leave a Reply 0

Your email address will not be published. Required fields are marked *