How to Disable Network Manager on CentOS 7

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

Disable Network Manager with the following commands:

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

service NetworkManager stop
chkconfig NetworkManager off

CentOS 7, CloudLinux 7, or RHEL 7:

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:

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:

chkconfig network on
service network start

CentOS 7, CloudLinux 7, or RHEL 7:

systemctl enable network.service
systemctl start network.service
Share

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.