The vi command is a text editor that operates in two modes: command mode and insert mode. Command mode is used to enter commands to manipulate the text, such as saving, quitting, copying, pasting, etc. Insert mode is used to enter text into the file. When the vi command is invoked without any additional parameters, it starts in command mode and opens a new empty file. To enter text, the user has to press i to switch to insert mode. To return to command mode, the user has to press Esc. To save and quit, the user has to enter :wq in command mode. The other options are either incorrect or not applicable. The vi command does not load the last file used or the content of the vi buffer by default. It also does not require the user to explicitly create or load a file. It does not exit with an error message unless there is a problem with the terminal or the system. References:
LPIC-1 Exam 101 Objectives, Topic 103: GNU and Unix Commands, 103.7 Use and edit text files
LPIC-1 Linux Administrator 101-500 Exam FAQ, LPIC-1 Exam 101 Objectives, GNU and Unix Commands (Total Weight: 25)
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