Tuesday, February 28, 2017

[Linux][Resolved] How to save and quit visudo while in insert mode


You may think it's a basic command if using linux, but i would skill mark down as an reference for the future.

Step 1

You need to press the "Esc" button on keyboard first.


Step 2

then you can use the command :wq to save change and exit the vi editor (quit vi, writing out modified file to file named in original invocation)
:wq
According to the official document, command :x should be also work:
:x

Step 3

Press Enter button and done (<result>).



Reference

https://www.cs.colostate.edu/helpdocs/vi.html

No comments :

Post a Comment