LPIC-1 Exam 101 v5 (Linux Administrator) — Question 111
Which of the following sequences in the vi editor saves the opened document and exits the editor? (Choose two.)
Answer options
- A. Ctrl XX
- B. Ctrl :W
- C. Esc zz
- D. Esc :wq
- E. Esc ZZ
Correct answer: D, E
Explanation
The correct options are D and E because both 'Esc :wq' and 'Esc ZZ' command the vi editor to save changes and exit. The other options either do not perform the save operation or are not valid commands in vi.