• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 320
  • Last Modified:

setting static IPs via commandline

I have a mac osx powermac on my network that I access via commandline only.  Right now, its getting its address via DHCP...   I plan to restrict the range that my router assigns DHCP to, and give the mac a static ip outside of that range.  Once its static, I dont have to worry that my shell scripts are pushing to the wrong ip!  Does anyone know how I can change network settings via command line?

  • 2
1 Solution

Telnet or SSH to the OS X machine and use ifconfig (man ifconfig) to configure the ip addresses.
You must be root. (enable in netinfo).
> ifconfig en0
this will change the ip of your machine to You can also add the subnet mask and broadcast mask if required.

That's what the link I just posted says...
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get 10% Off Your First Squarespace Website

Ready to showcase your work, publish content or promote your business online? With Squarespace’s award-winning templates and 24/7 customer service, getting started is simple. Head to Squarespace.com and use offer code ‘EXPERTS’ to get 10% off your first purchase.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now