• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 318
  • 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?

-meue
0
meuedyn
Asked:
meuedyn
  • 2
1 Solution
 
dobbyduckCommented:

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 192.168.1.66
this will change the ip of your machine to 192.168.1.66. You can also add the subnet mask and broadcast mask if required.

Dobby.
0
 
weedCommented:
That's what the link I just posted says...
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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