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.
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit