How to temporarily turn off NetworkManager from the command-line?

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

sudo service network-manager stop

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 and restart commands. So :

sudo stop network-manager

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:

sudo stop network-manager