Network Manager on CentOS

How to Disable Network Manager on CentOS 7

How to Disable Network Manager on CentOS 7 Network Manager, although sometimes useful, will prevent the installation of certain applications on CentOS. In this post, we show you how to disable it.

Network Manager is a service that runs in the system background. It allows users to easily establish new network connections. Its real usefulness comes when trying to configure a wireless connection or a virtual private network (such as a VPN).

However, there are situations where it is necessary to disable this service and today we will show you how to do it.

Disable Network Manager on CentOS

To install some applications on CentOS 7 VPS server, we need to disable the network manager. Consider that we want to install cPanel, unless Network Manager is disabled, an error will occur in the first step of installation.

Throughout this article, we’ll provide a step-by-step guide on how to make this and other installations possible. Let’s dive right into it:

Step 1: First, log in to CentOS server using an SSH connection. (If you want more information, see this blog.)

Step 2: Enter the following commands to close the network manager and remove it from the Linux VPS server startup.

systemctl stop NetworkManager.service
systemctl disable NetworkManager.service

Step 3: Then enter the following directory:

cd /etc/sysconfig/network-scripts

Step 4: Use the ls command to list all files in this directory and find your network adapter name.

ls

Step 5: After that, use an editor to open the file. For example, our network adapter is named “eno2656”, so we use the VI editor to open this file.

VI eno2656

Note: You can use “nano” editor to open this file.

Step 6: Once in the editor, you can see the network adapter configuration. Add following lines and save file.

NM_CONTROLLED=no

Please note: You should enter the command exactly as you see above (with upper and lower case letters).

Step 7: Now, write the following command to start the Linux default network service.

systemctl enable network.service
chkconfig network on

With these steps, you have changed the network interface controller from Network Manager to the Linux default network manager. Optional Step: Finally, you can remove the Network Manager service with the following command:

yum remove NetworkManager

Conclusion

For regular daily use, Network Manager can bring many benefits, for more server-related tasks, the service needs to be disabled. We hope that with this short tutorial, you were able to successfully disable Network Manager. If you have any questions or suggestions, please leave them in the comments section below.

Scroll to Top