Useful macOS network terminal commands – How to find DHCP lease details.

In this video we take a look at a macOS terminal command, that will allow us to query the details a DHCP server sends to our computer. This command can be useful to check the configuration of your DHCP server.

Note: As a general rule, if you are working from a laptop the device name of your WiFi adapter will be en0. However if you are working from a desktop computer, the network port will be en0, while the WiFi port will be en1

Quick reference notes:

  • From your macOS desktop, select Spotlight Search.
  • Within Spotlight Search type Terminal and press Enter on your keyboard
  • Now at the command prompt type.
 ipconfig getpacket en0
  • When you press Enter on the keyboard you will be presented with the DHCP lease details being provided by your router’s DHCP server.
  • To gracefully close your current Terminal session type:
exit
  • When you press Enter on your keyboard the Terminal session will end and you can close the Terminal application.

Reference Material:

Wikipedia article – Terminal (macOS)