• Skip to primary navigation
  • Skip to content
  • Skip to primary sidebar

The Geek Diary

HowTos | Basics | Concepts

  • Solaris
    • Solaris 11
    • SVM
    • ZFS
    • Zones
    • LDOMs
    • Hardware
  • Linux
    • CentOS/RHEL 7
    • RHCSA notes
    • SuSE Linux Enterprise
    • Linux Services
  • VCS
    • VxVM
  • Interview Questions
  • oracle
    • ASM
    • mysql
    • RAC
    • oracle 12c
    • Data Guard
  • DevOps
    • Docker
    • Shell Scripting
  • Hadoop
    • Hortonworks HDP
      • HDPCA
    • Cloudera
      • CCA 131

How to disable NetworkManager on CentOS / RHEL 7

By admin

Disabling NetworkManager

The following steps will disable NetworkManager service and allows the interface to be managed only by network service.

1. To check which are the interfaces managed by NetworkManager

# nmcli device status

This displays a table that lists all network interfaces along with their STATE. If Network Manager is not controlling an interface, its STATE will be listed as unmanaged. Any other value indicates the interface is under Network Manager control.

2. Stop the NetworkManager service:

# systemctl stop NetworkManager

3. Disable the service permanently:

# systemctl disable NetworkManager

4. To confirm the NetworkManager service has been disabled

# systemctl list-unit-files | grep NetworkManager

5. Add the below parameter in /etc/sysconfig/network-scripts/ifcfg-ethX of interfaces that are managed by NetworkManager to make it unmanaged.

NM_CONTROLLED="no"
Note: Be sure to change the NM_CONTROLLED=”yes” to “no” or the network service may complain about “Connection activation failed” when it cannot find an interface to start

Switching to “network” service

When the NetworkManager is disabled, the interface can be configured for use with the network service. Follow the steps below to configure and interface using network services.

1. Set the IP address in the configuration file: /etc/sysconfig/network-scripts/ifcfg-eth0. Set the NM_CONTROLLED value to no and assign a static IP address in the file.

NAME="eth0"
HWADDR=...
ONBOOT=yes
BOOTPROTO=none
IPADDR=...
NETMASK=...
GATEWAY=...
TYPE=Ethernet
NM_CONTROLLED=no

2. Set the DNS servers to be used by adding into the file: /etc/resolv.conf :

nameserver [server 1]
nameserver [server 2]

3. Enable the network service

# systemctl enable network

4. Restart the network service

# systemctl restart network
CentOS / RHEL 5, 6 : how to disable NetworkManager
Linux OS Service ‘NetworkManager’

Filed Under: CentOS/RHEL 7, Linux

Some more articles you might also be interested in …

  1. How to Connect Remote Host Using the ssh Command
  2. How to enable text colour in vi similar to vim in CentOS/RHEL
  3. How to create a customized tuned profile in CentOS/RHEL 6,7
  4. How to create a VDO (Virtual Data Optimizer) device with the async/sync/auto write policy
  5. How to Delete ASM Disk on Multipath Device in CentOS/RHEL
  6. CentOS / RHEL : How to identify/match LUN presented from SAN with underlying OS disk
  7. How to configure multiple ssh instances with own config file (CentOS/RHEL 7)
  8. How to configure initrd / initramfs to including kernel modules in CentOS/RHEL
  9. How to force the users to use both key and password with ssh in Linux
  10. Understanding linux fdisk utility

You May Also Like

Primary Sidebar

Recent Posts

  • How to capture a vmcore from a KVM or RHEV guest
  • How to disable firewalld and nftables and use iptables instead in CentOS/RHEL 8
  • How to add an Ethernet connection using nmcli in CentOS/RHEL 7
  • How to set the order to load certain modules in CentOS/RHEL 7 and 8
  • How to configure initrd / initramfs to including kernel modules in CentOS/RHEL
  • Archives
  • Contact Us
  • Copyright

© 2019 · The Geek Diary