101-500 Exam QuestionsBrowse all questions from this exam

101-500 Exam - Question 92


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

Show Answer
Correct Answer: DE

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.

Discussion

6 comments
Sign in to comment
CuriousLinuxCatOptions: DE
Jun 13, 2021

Can confirm that D and E is correct.

McLabaOptions: DE
Apr 1, 2021

D E is right !

iwkno6Options: DE
Jul 28, 2021

The answers are correct it's D & E.

LazylinuxOptions: DE
Apr 22, 2022

Tested works

rishardOptions: CE
May 24, 2020

CTRL + ZZ - not Esc ZZ

lanc
May 27, 2020

just tested with the MAC vi editor. ESC ZZ works.

cast7omadrid1
May 27, 2020

https://www.cyberciti.biz/faq/save-file-in-vi-vim-linux-apple-macos-unix-bsd/

rossricc
May 28, 2020

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

MartiFCOptions: DE
Feb 2, 2022

THE ANSWER IS CORRECT!