The network interface should not make a request for an IP over DHCP. So, what is the command to turn off NetworkManager in Ubuntu?
Update:
I am writing a script in which the interfaces receive static IPs. For this to happen I need to put a line in the script which will turn off NetworkManager. But when I'm not using that script I want to have DHCP on the interfaces.
If you don't want to have your inteface make a DHCP request, simply edit it (right on network manager applet, choose "Edit Connections", click on the interface in question, then choose the IPv4 tab and change "Automatic (DHCP)" to "Manual" and specify your settings manually.
If you need to turn off network manager regardless, use
You can specify stop, start or restart for most services.
Htorque notes that service is being deprecated in Ubuntu in favour of the
stop
,start
andrestart
commands. So :would also work. I still prefer using service because, as of Maverick, there's no auto-complete when you use the newer commands. A bug has been filed about this, and from that, a fix has been released, so hopefully this will be rectified in Natty this coming April.
I've recentely had a similar issue. For some reason, NetworkManager would default to DHCP even if I specify a static IP entry in NetworkManager or /etc/network/interfaces. I've solved it by uninstalling NetworkManager. If you want just to turn NetworkManager of temporary, run: