How To Exit Vim Text Editor Command

Originally published at:

I am a new Linux/Unix user. How do I exit the VIM / vi editor on Linux/Unix-like operating systems?

To exit without saving :q!
To exit saving “Shift zz”, so two capitol Z, or :wq

Linux sysadmin blog - Linux/Unix Howtos and Tutorials - Linux bash shell scripting wiki