Question: What Does Wq Do in Linux?

Question: What Does Wq Do in Linux?
Contents
Command Purpose
:wq or ZZ Save and quit/exit vi.
:q! Quit vi and do not save changes.
yy Yank (copy a line of text).

What is WQ?

The :wq command is used in Vim to write and quit. … The Vim help files give the following description of the command: Like “:wq”, but write only when changes have been made. So, :wq writes the buffer to disk either way, whereas just exits if the buffer hasn’t changed.

What is WQ in Unix?

To ignore this message, the command to quit out of vi without saving is :q!. This lets you exit vi without saving any of the changes. The command to save the contents of the editor is :w. You can combine the above command with the quit command, or use :wq and return.

Robert Thorne
Author

Robert Thorne

Robert Thorne covers electric vehicle innovations, autonomous driving systems, global mobility trends, and automotive engineering developments.