How to add static IP via cmd line?

John DeCarlo johndecarlo at gmail.com
Wed Dec 22 16:14:31 UTC 2004


On Wed, 22 Dec 2004 20:38:17 +0800, Senectus . <senectus at gmail.com> wrote:
> How do you force a static IP, DNS, netmask and Gateway via the cmd line?

You can definitely change the IP and netmask settings for an interface
with /sbing/ifconfig.

I know you can edit /etc/resolv.conf to change, remove, or add DNS entries.

route allows you to specify which gateway to use for each route you have.

There may be more elegant ways I don't know about.

-- 
John DeCarlo, My Views Are My Own




More information about the ubuntu-users mailing list