How to save file in vi editor?
Hi,
I am trying to find commands to save the file in the vi editor? Can anyone show me the example and explain me the commands?
Thanks
View Answers
June 16, 2016 at 7:32 PM
Hi,
Here are the details:
How to save file in vi editor?
- Press 'Esc' button to go to the Command mode and ':' appears
- Type :w to save the file
- Type :wq to save and quit
- Type :q! to quit without saving
- Type :wq! to force write to file even if it does not have write permission
- Type: x to write and quit and this command is short for :wq
- Type :qa to quit all
Thanks
June 18, 2016 at 2:42 AM
Here is the video instruction of saving the file in vi editor:
Thanks