How to set static ip-address in terminal

From the GUI, you can set it using the "Network" pane of the System Preferences.

From the command-line, you can control this with the "ifconfig" program. There is a ton of information on it if you perform a simple Google search for "Mac OS X ifconfig".
 
From the GUI, you can set it using the "Network" pane of the System Preferences.

From the command-line, you can control this with the "ifconfig" program. There is a ton of information on it if you perform a simple Google search for "Mac OS X ifconfig".
i know how to set DHCP ,just execute :ipconfig set en0 DHCP
and i have executed :man ipconfig
i find the info :ipconfig set interface-name (MANUAL | INFORM) ip-address subnet-mask
so how to set Router and DNS ?
 
Back
Top