Home > Article > Operation and Maintenance > Which command in vi is to force exit without saving?
All Unix Like systems will have a built-in vi document editor, but other document editors may not exist. But currently we use the vim editor more. Vim is a text editor developed from vi.
The "q!" command in vi forces an exit without saving.
Some common commands in vi:
:w save;
:w filename save as filename;
:wq ! Save and force exit;
:wq! filename Note: Force exit after saving with filename as the file name;
:x Save and exit (only save when the file has changed)
Recommended learning: linux tutorial
The above is the detailed content of Which command in vi is to force exit without saving?. For more information, please follow other related articles on the PHP Chinese website!