How to Disable NetworkManager in CentOS/RHEL 8

In Linux, the Network Manager is a daemon that handles the detection of active networks and configuration of network settings. When up and running, the network manager automatically detects active network connections, where wireless or wired, and allows the user to perform further configuration of the active connections.

Read Also: Getting Started with NetworkManager in RHEL/CentOS 8

When the network manager is disabled, it’s impossible to detect any networks or configure any network configurations. Basically, your Linux system gets isolated from any network. In this topic, you will learn how to disable network manager on CentOS 8 and RHEL 8.

Step 1: Update the System

First, log in and update the packages on your CentOS 8 or RHEL 8 system.

$ sudo dnf update 
Update CentOS 8 System
Update CentOS 8 System

Step 2: List the Active Connections on System

Before we disable Network, it’s prudent to establish the number of active connections on your system. There are a few commands that you can use to display the active connection:

ifconfig command

When invoked the ifconfig command, it lists down active network interfaces as shown:

$ ifconfig
ifconfig - List Active Network Connections
ifconfig – List Active Network Connections

nmcli command

nmcli is yet another command-line tool that is more intuitive than the ifconfig command.

# nmcli
nmcli - List Active Network Connections
nmcli – List Active Network Connections

From the output above, we can clearly see that there are 2 active interfaces: enp0s3 which is the wireless interface and virbr0 which is the Virtualbox interface. lo which is the loopback address is unmanaged.

nmtui command

nmtui is a command-line graphical tool, use to configure network settings.

# nmtui
Configure Network Connection
Configure Network Connection

Select the first option ‘Edit a connection‘ and press the TAB key to the ‘Ok‘ option and hit ENTER.

Active Network Interfaces
Active Network Interfaces

From the output, we can see two active network interfaces, as previously seen in the previous nmcli command.

Step 3: Disable Network Manager in CentOS 8

To disable NetworkManager service in CentOS 8 or RHEL 8, execute the command.

# systemctl stop NetworkManager

To confirm the status of NetworkManager run.

# systemctl status NetworkManager
Disable Network Manager Service
Disable Network Manager Service

Now try listing the active network interfaces using either nmcli or nmtui command.

# nmcli
# nmtui
Check Network Interfaces Status
Check Network Interfaces Status

From the output above, we have confirmed that the NetworkManager service is disabled.

Step 4: Enable Network Manager in CentOS 8

To get the NetworkManager service running again, simply run.

# systemctl start NetworkManager

Now check the status of the NetworkManager service using either nmcli or nmtui.

# nmcli
# nmtui
Enable NetworkManager Service
Enable NetworkManager Service
Conclusion

In this article, you learned how to disable and even start NetworkManager service on CentOS 8 and RHEL 8 system. Remember good practice always demands that NetworkManager service is up and running for automatic detection of networks and managing interface settings.

Hey TecMint readers,

Exciting news! Every month, our top blog commenters will have the chance to win fantastic rewards, like free Linux eBooks such as RHCE, RHCSA, LFCS, Learn Linux, and Awk, each worth $20!

Learn more about the contest and stand a chance to win by sharing your thoughts below!

James Kiarie
This is James, a certified Linux administrator and a tech enthusiast who loves keeping in touch with emerging trends in the tech world. When I'm not running commands on the terminal, I'm taking listening to some cool music. taking a casual stroll or watching a nice movie.

Each tutorial at TecMint is created by a team of experienced Linux system administrators so that it meets our high-quality standards.

Join the TecMint Weekly Newsletter (More Than 156,129 Linux Enthusiasts Have Subscribed)
Was this article helpful? Please add a comment or buy me a coffee to show your appreciation.

9 Comments

Leave a Reply
  1. Personally feel that NetworkManager and network autoconfiguration is EVIL in servers.

    There is no need for Autoconf when the same server is running 10 years in premises 24/7.

    Any auto-configuration event would cause downtime and even an option to have Autoconf causes impressive attack vectors, and the servers will fall like dominoes.

    And I hate that firewalld and its default setup which is shoveled from the matter that stinks. It will be blessed by attackers too. (just check net documents how NFS is configured nicely to the wrong zone ..).

    Reply
    • Hey Ari, great observation, However, the autoconfiguration may still be a blessing when you are trying to troubleshoot network issues. Of course, disabling Network Manager is not a good idea because, upon a reboot, you will lose connectivity to your server.

      Reply
  2. You are using the wrong title, this is just stopping/starting NetworkManager.

    Try run systemctl disable NetworkManager, then reboot your machine, you will see a BIG difference…

    In fact, don’t try it, it will lock up your machine if it is headless, as there will be no more network.

    Reply
  3. Once you have disabled NetworkManager you won’t have any Ethernet device on the system. This is true on virtual machines, but may not be true on physical machines. I’ll need to test this.

    I have disabled and masked NetworkManager, NetworkManager-dispatcher, NetworkManager-wait-online and now I have no Ethernet device whatsoever. So now I’ll need to re-enable NetworkManager and friends so I can ‘yum install network-scripts‘ which will give me my old school functionality. I have

    Reply
  4. Disabling/enabling the Network Manager may be a great teaching exercise on the way to becoming a Sys Admin but it is never explained WHY I would want to/need to do it in real life.

    Reply
    • Hey Dragonmouth, disabling/enabling Network manager can be used as one of the troubleshooting techniques when you have pesky issues with your network adapters. It’s an easier and faster option than disabling/enabling the adapters one by one.

      Reply

Got Something to Say? Join the Discussion...

Thank you for taking the time to share your thoughts with us. We appreciate your decision to leave a comment and value your contribution to the discussion. It's important to note that we moderate all comments in accordance with our comment policy to ensure a respectful and constructive conversation.

Rest assured that your email address will remain private and will not be published or shared with anyone. We prioritize the privacy and security of our users.