Exiting vi
Whew! Time to exit vi (Figure 4.16).
Figure 4.16. Use :q! to quit vi without saving changes.
To Exit vi:
- :q Enter command mode with q, then type :q to quit vi. If you haven’t saved your latest changes, vi will not quit and will tell you to use ! to override. To quit without saving your changes, use :q!, as shown in Figure 4.16.
✓ Tips
If you don’t really want to quit but want to edit a different file instead, ...
Get Unix Third Edition: Visual Quickstart Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.