how to save and exit from vim editor in linux code example Example 1: save and close vim // Save & exit(quit) :wq Example 2: vim save and quit // Save & exit :wp