LPIC-1 Exam 101 (Linux Administrator) — Question 41

Which of the following sequences in the vi editor saves the opened document and exits the editor? (Choose TWO correct answers.)

Answer options

Correct answer: A, D

Explanation

The correct options are A and D because 'esc ZZ' and 'esc :wq!' both perform the function of saving the file and exiting the editor. Option B is incorrect as 'ctrl :w!' is not a valid command, option C has a typo in the command, and option E does not relate to saving or exiting in vi.