How to add static IP via cmd line?
Vram
lamsokvr at xprt.net
Wed Dec 22 17:15:23 UTC 2004
On Wed, 2004-12-22 at 20:38 +0800, Senectus . wrote:
> How do you force a static IP, DNS, netmask and Gateway via the cmd line?
>
Static IP
/sbin/ifconfig eth0 down
/sbin/ifconfig eth0 aa.bb.cc.dd up
aa.bb.cc.dd is you ip addresss
If you run a custom mask you need to set that also
DNS servers are set in /etc/resolv.conf
Gateway
route add default gw aa.bb.cc.dd
HTH
Vram
More information about the ubuntu-users
mailing list