View Full Version : [ubuntu] NetworkManager wont let me configure static network

March 4th, 2009, 06:34 PM
Hello, I wanted to connect to a network with a static ip address, gateway and netmask. I found that in linux it is required to modify two network configuration files to do this.
The first one is /etc/network/interfaces, in which I wrote the following:

iface eth0 inet static

The second is /etc/resolv.config in which I wrote the following:


The addresses are just examples.

Finally I typed this:

killall NetworkManager
sudo /etc/init.d/networking restart
ifconfig eth0 up

The problem is that NetworkManager was still trying to get an address from dhcp service, which should not be, since I already assinged it on the network files I mentioned above. When I introduced the data directly into Edit connections window it did connect, so I know everything else was ok. But I donīt want to use NetowrkManager`s GUI to configure the network, I want to use bash scripts to configure my networks easily and be able to use them in other linux distros, how can I do this?
Thanks in advance.

March 5th, 2009, 07:59 PM
Network Manager overrides these files.

You can disable NM https://help.ubuntu.com/community/NetworkManager#Disabling%20NetworkManager