How to disable NetworkManager in Rocky Linux 8
Installing network-scripts
To disable NetworkManager on Rocky Linux 8, we need to install the network-scripts package which provides legacy support to the network service,
yum install network-scripts
Enable the service to start onboot,
systemctl enable network
Next, we add NM_Controlled=no to the interface config file,
nano /etc/sysconfig/network-scripts/ifcfg-<interface>
Replace
nano /etc/sysconfig/network-scripts/ifcfg-ens3
Add the following line to the last line of the ifcfg-ens3 config file,
NM_CONTROLLED="no"
Next, Stop and Disable the NetworkManager service,
systemctl stop NetworkManager
systemctl disable NetworkManager
Restart the network now via the "network" service,
service network restart
At this point, you will see the following information,
[root@server ~]# service network restart
Restarting network (via systemctl): [ OK ]
Enable the network service to start onboot,
systemctl enable network
After which you should get 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
You may reboot your VPS to test if the network comes alive on it's own via the Network service automatically onboot.
Done!
CrownCloud - Get a SSD powered KVM VPS at $4.5/month!
Use the code WELCOME
for 10% off!
1 GB RAM / 25 GB SSD / 1 CPU Core / 1 TB Bandwidth per month
Available Locations: LAX | MIA | ATL | FRA | AMS