Renewing DHCP leases from the Terminal in Mac OS X

On OSX, it takes a handful of clicks to release and renew the DHCP lease through the GUI. For someone who usually has a Terminal (or like five) open, a way to do it from the commandline would be nice. Figuring out how to do this took longer than the five seconds I wanted it to, so I thought I'd share.

ipconfig set en0 DHCP

Obviously, change en0 to whatever adapter you want.

Trackback URL for this post:

http://www.constantthought.com/trackback/11