Quitting vi/Vim Editor with - saving the file in linux

You are here : Home / LINUX Tutorials

In this tutorial we will learn how to edit file in vi/Vim Editor - Save and quit in linux.



Contents of page >
  • Exiting/Quitting vi/Vim Editor with - saving the file in linux>
  • For Exiting/quitting vi/Vim Editor with saving the file (In shortest way) in linux>




Exiting/Quitting vi/Vim Editor with - saving the file in linux>

STEP1 : How to quit/exit vi/Vim Editor - saving the file >

Then press Esc key on keyboard

STEP2 : How to quit/exit vi/Vim Editor - saving the file >

Then type ’:’ (colon)

STEP3 : How to quit/exit vi/Vim Editor - saving the file >

Type
‘wq!’


STEP4 : How to quit/exit vi/Vim Editor - saving the file >
Press Enter
You will quit vi/Vim Editor saving the file.



For Exiting/quitting vi/Vim Editor with saving the file (In shortest way) in linux>

STEP1 : How to quit/exit vi/Vim Editor - saving the file (In shortest way) >

Press Esc key on keyboard

STEP2 : How to quit/exit vi/Vim Editor - saving the file (In shortest way) >

You may also simply type
‘ZZ’
You will quit vi/Vim Editor saving the file.



Summary -
In this tutorial we learned how to quit or exit vi/Vim Editor with - saving the file in linux.



Having any doubt? or you liked the tutorial! Please comment in below section.
Please express your love by liking JavaMadeSoEasy.com (JMSE) on facebook, following on google+ or Twitter.


RELATED LINKS>

How to edit file in vi/Vim Editor in linux - Save and quit

Exiting/ quitting vi/Vim Editor without saving the file

vi error - E37: No write since last change (add ! to override)

bash: ./yourScriptFile.sh: Permission denied Linux solved



Labels: Linux
eEdit
Must read for you :