Disable NetworkManager Debian

Disable the NetworkManager on a Debian desktop with GUI

why? ...
I think it 's easier to edit the standard files than having to deal with yet another MadManInTheMiddle Madness :)
I am kidding NetworkManager is cool ... but I cannot stand it.

Check NetworkManager Status
# nmcli nm 
RUNNING         STATE           WIFI-HARDWARE   WIFI       WWAN-HARDWARE   WWAN      
running         connected       enabled         enabled    enabled         disabled  
# nmcli dev
DEVICE     TYPE              STATE        
eth0       802-3-ethernet    connected    


Stop Network Manager
# /etc/init.d/network-manager stop
[ ok ] Stopping network connection manager: NetworkManager.


Remove Network Manager init script links
# update-rc.d network-manager remove
update-rc.d: using dependency based boot sequencing


From
# man NetworkManager.conf



[ifupdown]
       This section contains ifupdown-specific options and thus only has effect when using ifupdown plugin.

       managed=false | true
              Controls whether interfaces listed in the 'interfaces' file are managed by NetworkManager.  If set to true, then  interfaces   listed    in  /etc/network/interfaces  are  managed by NetworkManager.  If set to false, then any interface listed in /etc/network/interfaces will be ignored by NetworkManager.


so something like the following should work
# cat /etc/NetworkManager/NetworkManager.conf 
[main]
plugins=ifupdown,keyfile

[ifupdown]
managed=false



Edit /etc/network/interfaces eg:
# cat /etc/network/interfaces 
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

auto eth0
allow-hotplug eth0
iface eth0 inet static
address 10.2.24.50
netmask 255.255.255.128
gateway 10.2.24.125



Set nameserver
# echo "nameserver 10.2.24.4" > /etc/resolv.conf


Restart networking
# /etc/init.d/networking restart
[warn] Running /etc/init.d/networking restart is deprecated because it may not re-enable some interfaces ... (warning).
[ ok ] Reconfiguring network interfaces...done.


and check with
# ifconfig


Restart the system to check
# shutdown -r now


OK, it works.



Disable the NetworkManager in Debian