Which of the following sequences in the vi editor saves the opened document and exits the editor? (Choose two.)
Which of the following sequences in the vi editor saves the opened document and exits the editor? (Choose two.)
To save an opened document and exit the vi editor, you can use the sequence Esc followed by :wq, or Esc followed by ZZ. The Esc key ensures you are in Command Mode. Once in Command Mode, :wq writes (saves) the file and quits the editor, and ZZ saves the file and quits the editor directly.
Can confirm that D and E is correct.
D E is right !
The answers are correct it's D & E.
Tested works
CTRL + ZZ - not Esc ZZ
just tested with the MAC vi editor. ESC ZZ works.
https://www.cyberciti.biz/faq/save-file-in-vi-vim-linux-apple-macos-unix-bsd/
Esc is intended to ensure you are in Vi Command Mode. When you are in command mode you have to type ZZ (capital means actually SHIFT+zz) to save and exit. So the answer is correct Esc ZZ
THE ANSWER IS CORRECT!