LPIC-1 Exam 101 v5 (Linux Administrator) — Question 65

Which command must be entered before exiting vi to save the current file as filea.txt?

Answer options

Correct answer: D

Explanation

The correct command to save the current file in vi is ':w filea.txt', which writes the changes to the specified file. The other options either do not exist in vi or do not perform the required save operation. For example, ':save' is not a valid command in vi.