How can I change network settings via CLI.

I am running 6.2.0 and some reason after the install the en0 is setup to use DHCP. I want to set the IP, how can I do this from the command line?

either u have to edit /etc/net.cfg properly or do some ifconfig (eg: ifconfig en0

/etc/net.cfg example

[code]# nto network config file v1.2
version v1.2

hostname n42
lookup file bind

type ethernet
mode manual

I do not have a /etc/net.cfg. Can I just create one?

If I do a ifconfig will that change be permanent? Or do I need to put that in a startup script?


the /etc/net.cfg is usually created and maintained by phlip photon application, i dont know if creating it manually will work ok, just try it …

ifconfig configuration is temporary, u can put the command in /etc/rc.d/rc.local, if the file doesnt exist u can create it as root and with executable permisions (touch /etc/rc.d/rc.local; chmod a+x /etc/rc.d/rc.local)