How to I edit vi /etc/network/interfaces?
Inside the interfaces, there is only:
auto lo
iface lo inet loopback
How do I add eth0 into the interface?
Printable View
How to I edit vi /etc/network/interfaces?
Inside the interfaces, there is only:
auto lo
iface lo inet loopback
How do I add eth0 into the interface?
You would just need to create an entry for eth0. Using nano may be easier for you if you aren't familiar with vi.
Add lines like the following under the lo interface.Code:nano /etc/network/interfaces
For DHCP it would look like this.
For a static ip, it would look something like this (obviously tailored to your subnet).Code:auto eth0
iface eth0 inet dhcp
To save your changes, press Ctrl+x following by Ctrl+y.Code:auto eth0
iface eth0 inet static
address 192.168.0.10
netmask 255.255.255.0
gateway 192.168.0.1
dns-nameservers 192.168.0.1 8.8.8.8 8.8.4.4
Then, restart networking to enable the changes.
Code:/etc/init.d/networking restart
thank you very much life saver!!!