Multiple choice technology operating systems

You have made changes to a file and want to quit vi without saving these changes. what command will you use?

  1. :wq

  2. x

  3. q!

  4. w!

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The command ':q!' forces vi to quit without saving any changes. The colon (:) enters last-line mode, 'q' means quit, and the exclamation mark (!) forces the operation even when there are unsaved changes. ':wq' would save and quit, which is not what's asked.