• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

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. CentOS / RHEL : How to add, delete and display LVM tags
  2. How to configure iSCSI Initiator (client) in CentOS / RHEL 6
  3. How to blacklist a local disk using the “find_multipaths” directive in CentOS/RHEL 6
  4. How to Check if any of the RPM files were tampered with
  5. How to copy directories recursively using rsync while excluding specific files
  6. rpc.statd[PID]: Failed to create listener xprt (statd, 1, udp6) – CentOS/RHEL 6, 7
  7. dstat Command Examples in Linux
  8. How to Password Protect GRUB2 in Oracle Enterprise Linux 7
  9. “WARNING: Failed to connect to lvmetad. Falling back to device scanning” – error while running LVM commands
  10. –force V/s –nodeps : rpm command options to install or uninstall a package

You May Also Like

Primary Sidebar

Recent Posts

  • PHP cos function – Cosine
  • PHP connection_status function – Returns connection status bitfield
  • PHP ceil function – Round fractions up
  • PHP bindec function – Convert a number between arbitrary bases

© 2022 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright