How to Disable Network Manager


Last modified: September 22, 2021

Overview

This document describes how to disable the Network Manager service in systems that run CentOS 7, CloudLinux™ 7, Red Hat® Enterprise Linux® 7 (RHEL) and earlier versions. The Network Manager service automates the system’s network settings and disrupts connections to the IP addresses that reside in the ipaliases module.

When you disable the Network Manager service, you disable this automation. You must manually address any changes to the system’s network settings. For example, if you disable the Network Manager, then reboot the system, the system will not automatically reconnect any preexisting connections.

Warning:
  • cPanel, L.L.C. (which includes cPanel & WHM and cPanel Technical Support) does not support the Network Manager service.
  • Exercise extreme caution when you disable the Network Manager service. Your server may lose its network services if you do not disable Network Manager correctly.
  • CentOS 6 or 7 systems (as well as CloudLinux and Red Hat Enterprise Linux) include the network.service package by default, but do not enable the package. You must disable the Network Manager service and enable the network.service service before you install cPanel & WHM. Currently, the cPanel & WHM installer does not automatically disable Network Manager in these systems.

For more information about how to disable the Network Manager service, read RedHat’s Disabling Network Manager documentation.

Note:

On systems that run the CentOS 8 or AlmaLinux OS 8 operating systems, the cPanel & WHM installer will automatically disable the Network Manager service and enable the network.service service.

Warning:

cPanel & WHM version 92 for CentOS 8 and CloudLinux 8 is experimental software and we do not recommend using it in production environments. For more information, read our cPanel & WHM version 92 for CentOS 8 documentation.

Upgrade to a later version of cPanel & WHM to use CentOS 8 and CloudLinux 8 in production environments.

Disable the Network Manager service

To disable the Network Manager service, perform the following steps:

  1. Disable Network Manager with the following commands:

    • CentOS 6, CloudLinux 6, Red Hat Enterprise Linux 6 (RHEL), or Amazon Linux:

      1
      2
      
        service NetworkManager stop
        chkconfig NetworkManager off

    • CentOS 7, CloudLinux 7, or RHEL 7:

      1
      2
      
        systemctl stop NetworkManager
        systemctl disable NetworkManager

  2. Change to the /etc/sysconfig/network-scripts directory.

  3. Open the ifcfg-eth0 and ifcfg-lo files with your preferred text editor and, if they exist, set the following keys’ values:

    1
    2
    
    NM_CONTROLLED=no
    ONBOOT=yes
    Important:
    If either of these keys does not exist in your ifcfg-eth0 and ifcfg-lo files, do not add it. Instead, proceed to Step 4.

  4. Run the following commands to restart the network:

    • CentOS 6, CloudLinux 6, RHEL 6, or Amazon Linux:

      1
      2
      
        chkconfig network on
        service network start

    • CentOS 7, CloudLinux 7, or RHEL 7:

      1
      2
      
        systemctl enable network.service
        systemctl start network.service

Additional Documentation