Re: Refresh IP address in the Terminal by Curtis Thompson on Feb 7, 2003 at 8:59:41 pm
as an admin, you can do this:
ifconfig en0 down
ifconfig en0 up
(that's en[zero], btw)...
en0 is your primary network adapter, and down will shut it down and up will turn it back on - if you have the box set to use dhcp, it will need to go get a new ip when it starts up...if you have sudo enabled, you can add sudo to the front of each command and just enter your admin password that way...otherwise, you'll need to be in an admin account to do this. you can switch to an admin account in the terminal only by typing