Thursday, May 2, 2024
 Popular · Latest · Hot · Upcoming
129
rated 0 times [  129] [ 0]  / answers: 1 / hits: 375338  / 2 Years ago, wed, april 13, 2022, 5:35:34

I can't save changes after editing



sudo vi /etc/network/interfaces


Text before editing:



auto lo
iface lo inet ...


Edited to:



auto eth0
iface eth0 inet dhcp


What key combination or sequence must I press to save this?


More From » vim

 Answers
1

You're probably in editing/insert mode. You need to type the following sequence :




  1. Esc, to quit edit mode and fallback to command mode ;

  2. :+w+q, start with a : (colon) then press w and finally q to write and quit (or just :w to write without quitting)

  3. then press Enter to valid.


[#32778] Friday, April 15, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
hamostic

Total Points: 403
Total Questions: 142
Total Answers: 112

Location: Iceland
Member since Sat, Sep 17, 2022
2 Years ago
;