I am trying to set the eth0
interface to use dhcp to get an ipv4 address, using the command line. I can manually change the ip address using
sudo ifconfig eth0 x.x.x.x netmask x.x.x.x
Is there a similar command to use to set eth0
to get an address using dhcp? I tried typing:
sudo dhclient eth0
however the ip address doesn't change when I type this. The /etc/network/interfaces
file was set to
iface eth0 inet manual
which I then changed to:
auto eth0
iface eth0 inet dhcp
however this doesn't change the eth0
ip address even if the system is rebooted.