Network
The dhclient command
DHCP client: asks the server for an address and configures the interface with it.
Syntax
sudo dhclient <interfaz>Copy-ready examples
$ sudo systemctl start isc-dhcp-serverStart the server$ sudo dhclient eth0Ask for an IPYou can try them in the browser terminal: it does not touch your computer.
Typical mistakes
- If the server is not active or there is no range, it gets no offers (No DHCPOFFERS received).
Related commands
FAQ
What does dhclient do step by step?
It sends DHCPDISCOVER, receives DHCPOFFER, sends DHCPREQUEST and receives DHCPACK with its IP.
Learn to actually use it
The basic Linux course takes you from zero to console fluency with 24 self-grading lessons.
Start the free course