Network
The dhcpd command
DHCP server: hands out IP addresses automatically to the machines on a network. With -t it only validates the config.
Syntax
sudo dhcpd [-t] [-cf /etc/dhcp/dhcpd.conf]Most useful options
-tCheck the config without starting-cfUse another config fileCopy-ready examples
$ sudo dhcpd -tValidate the configYou can try them in the browser terminal: it does not touch your computer.
Typical mistakes
- The configuration lives in /etc/dhcp/dhcpd.conf: subnet, range, routers...
- Before starting it, check with dhcpd -t: a missing semicolon breaks it.
FAQ
Where is the IP range defined?
In /etc/dhcp/dhcpd.conf, inside the subnet block with the range directive.
How do I apply changes?
Validate with dhcpd -t and restart with systemctl restart isc-dhcp-server.
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