Change Server to Static IP without GUI

Avi Greenbury avismailinglistaccount at googlemail.com
Thu May 15 14:43:26 UTC 2008


On Thu, 15 May 2008 09:33:51 -0500
Kipton Moravec <kip at kdream.com> wrote:

> When I set up my server I set it up so it would get a dynamic address. 
> 
> Now I want to change it to a static address. What file do I have to go
> to to change it? I do not have a GUI, just command line. (I know how to
> do it with the GUI, but the server does not have it.)
> 

/etc/networking/interfaces

You want something like (IIRC):

auto eth0
iface eth0 inet static
	address 10.0.0.1
	netmask 255.255.255.0
	gateway	10.0.0.2
	
There is another paramater that you need, but I can't for the life of me remember it off the top of my head at the minute. A quick google for the above file wil tell you. DNS entries (can) go in there, too. Google for /etc/networking/interfaces and you'll more than likely get some better explanations.


-- 
Avi Greenbury




More information about the ubuntu-users mailing list