Exiting CLI and VIM in Linux

Well this is another issue faced by noobs. According to a recent report (Stack Overflow: Helping One Million Developers Exit Vim) exiting VIM is one of the most searched article on Stack Overflow. This article is intended to help noobs exit in a Linux environment.

Exiting the CLI

To force quit or “kill” a running command, you can use “Ctrl + C”. most of the applications running from the terminal will be forced to quit.

Exiting Nano Editor

If you are using the nano editor, simply press “Ctrl + X” to exit. This will prompt you whether you want to save before quitting or not.

Exiting VIM

  1. Press “Esc” to initiate exit sequence
  2. Then type a colon “:” Remember after pressing Esc and “;“, you may not see this action taking place, but simply continue with the next step
  3. Continue typing “q!” to force quit without saving. If you want to save the changes instead of “q!“, type “wq” (This means write then quit).

Leave a comment

Design a site like this with WordPress.com
Get started