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?
|
I can't save changes after editing
Text before editing:
Edited to:
What key combination or sequence must I press to save this? |
||||
|
You're probably in editing/insert mode. You need to type the following sequence :
|
|||
|
|
|
I usually press ESC and then hold Shift and press z twice. Just like you would like to type two capital Z letters in word editor :) That saves your document and closes your editor. |
||||
|
|
|
Check whether you have administrative (root) privileges to edit the file. use this command
If the result is not "root", then you are not supposed to edit the file. To login as root user, use the below command
or
Edit the file,
After the changes, save the file using
Thats all |
||||
|
|
viorvim, I would recommend using graphical based editor likegeditto open them. Replacesudo viwithgksu gedit. – Aditya Feb 8 at 15:15