Are you looking to disable NetworkManager in Rocky Linux 8? If so, you’ve come to the right place. In this article, we will guide you through the steps to disable NetworkManager and provide legacy support to the network service. By following these steps, you can ensure efficient and reliable network connectivity on your Rocky Linux 8 system. So let’s get started!
Installing network-scripts package
To disable NetworkManager on Rocky Linux 8, we need to install the network-scripts
package, which provides legacy support to the network service. Open your terminal and run the following command to install the package:
yum install network-scripts
Enabling the network service on boot
Once the network-scripts
package is installed, we can enable the network service to start on boot. Run the following command:
systemctl enable network
Modifying the interface config file
Next, we need to modify the interface config file to disable NetworkManager for a specific interface. Open the interface config file using your preferred text editor. For example, if the interface name is ens3
, run the following command:
nano /etc/sysconfig/network-scripts/ifcfg-ens3
Within the file, add the following line to the last line:
NM_CONTROLLED="no"
Save the file and exit the text editor.
Stopping and disabling NetworkManager service
After modifying the interface config file, we need to stop and disable the NetworkManager service. Run the following commands:
systemctl stop NetworkManager systemctl disable NetworkManager
Restarting the network service
With NetworkManager disabled, we can now restart the network service to apply the changes. Run the following command:
service network restart
Upon successful restart, you should see the following output:
[root@server ~]# service network restart Restarting network (via systemctl): [ OK ]
Enabling the network service on boot (again)
To ensure that the network service starts automatically on boot, run the following command:
systemctl enable network
You should receive the following output:
[root@server ~]# systemctl enable network
network.service is not a native service, redirecting to systemd-sysv-install.
Executing: /usr/lib/systemd/systemd-sysv-install enable network
Testing the network connectivity
At this point, you can reboot your Rocky Linux 8 system to test if the network comes alive automatically via the network service on boot. If the network connectivity is established successfully, you have successfully disabled NetworkManager and enabled the network service.
Conclusion
In this article, we have provided a step-by-step guide on how to disable NetworkManager in Rocky Linux 8. By installing the network-scripts
package, modifying the interface config file, and stopping/disabling the NetworkManager service, you can ensure a reliable and efficient network connection on your Rocky Linux 8 system. Remember to enable the network service on boot to maintain consistent network connectivity. If you encounter any issues or have further questions, feel free to reach out to our technical support team at Shape.host.
Shape.host is a leading provider of Linux SSD VPS hosting services. Our reliable and scalable cloud hosting solutions empower businesses with efficient and secure infrastructure. Whether you need to disable NetworkManager or require any other technical assistance, our team of experts is ready to assist you. Visit Shape.host today to explore our hosting services and elevate your online presence.