If you receive
command not found when trying to run
dhclient, it's possible that these are not installed.
To install the DHCP client utilities run:
sudo apt install isc-dhcp-client
This will install the
isc-dhcp-client package, which includes the dhclient.
After the installation, you should be able to use the
dhclient command to receive an IP address from a DHCP server.
Make sure that
/etc/network/interfaces is configured to use DHCP.
iface eth0 inet dhcp
eth0 with your network interface name on your system.
Restart the networking with:
systemctl restart networking
You can run the following command to request an IP address:
dhcpd command you mentioned is for the DHCP server, not the client.
If you need to configure and run a DHCP server, you will need to install and set up the
isc-dhcp-server package instead.
Configure network with netplan:
How to Configure Networking in Ubuntu 20.04 with NetPlan
netplan configuration file in the
and has a
Edit the file, should see a
yaml structure defining the network interfaces and their configurations. Set the
dhcp4 property to
If you have multiple network interfaces, you can add similar sections for each interface.
Request an IP address:
Ubuntu Network configuration