LPIC-1 Exam 101 (Linux Administrator) — Question 45
What happens after issuing the command vi without any additional parameters?
Answer options
- A. vi starts and loads the last file used and moves the cursor to the position where vi was when it last exited.
- B. vi starts and requires the user to explicitly either create a new or load an existing file.
- C. vi exits with an error message as it cannot be invoked without a file name to operate on.
- D. vi starts in command mode and opens a new empty file.
- E. vi starts and opens a new file which is filled with the content of the vi buffer if the buffer contains text.
Correct answer: D
Explanation
The correct answer, D, explains that vi opens in command mode and creates a new empty file when no parameters are provided. Options A, B, C, and E are incorrect because they describe behaviors that do not occur when vi is launched without any file name or additional parameters.