HowTo: Exit Vim Text Editor Command

by on January 5, 2013 · 0 comments· LAST UPDATED January 5, 2014

in , , ,

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

Vi or vim is a text editor for Linux and Unix-like operating systems. It can be used to edit all kinds of plain text files. It is especially useful for editing programs or system configuration files.
Tutorial details
DifficultyEasy (rss)
Root privilegesNo
RequirementsNone
Estimated completion time1m
The basic syntax is as follows to open a file using vim:

vim filenmame
vi filename

How to exit the VIM editor

First, you need to switch to command mode. This can be done by hitting the [Escape] key. Next, you can type the following commands:

:q to quit.

:q! to quit without saving data/file.

:x save and quit.

Example: How to exit vim editor in terminal?

Press the [Escape] key
Type :
Type q
Type [Enter] key

Related media (Video) - Exit from the vim/vi text editor command

This tutorial is also available in a quick video format:



(Video 01: How to exit from the vim/vi text editor)

TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!

{ 0 comments… add one now }

Leave a Comment

Tagged as: , , , ,

Previous Faq:

Next Faq: