network – How can I release and renew my DHCP lease from Terminal? – Ask Different
Posted by jpluimers on 2016/06/07
Via the answer below I created the renew alias. I already had the first two aliases.
alias route-and-ipaddresses="netstat -nr | grep 'Internet\|Gateway\|default' && echo && ifconfig | grep '\: flags\|inet\|inet6' && echo more detailed info through ifconfig and netstat -nr" alias whatismyip="curl http://whatismyip.akamai.com && echo" alias renew_dhcp="sudo ipconfig set en0 DHCP && echo waiting 10 seconds for DHCP lease to be obtained && sleep 10 && route-and-ipaddresses && whatismyip"
–jeroen
via: network – How can I release and renew my DHCP lease from Terminal? – Ask Different.






Leave a comment