Configure DHCP client on Ubuntu

To configure your Ubuntu distribution to be a DHCP client, you need to modify the /etc/network/interfaces file. You will need to add the following line to the file:

iface INTERFACE inet dhcp

For example, to configure the eth0 interface as a DHCP client, we would add the following configuration:

ubuntu configure dhcp client

The system should now request network parameters from the DHCP server when booting.

To run the DHCP process manually, you can use the dhclient command. For example, to run the DHCP process on the eth0 interface, use the following command:

linux dhclient command

We have used the -r option to release the current interface configuration.
Geek University 2021