Identifying managed network interfaces
The first thing you must do is to identify which network interfaces are being managed, and for that purpose you can use the following CLI command.
nmcli device status
As you can see in the screenshot above the network interface we want to work with is the one which “type” says “ethernet” and whose name is “enp0s3“.
Network Manager current status
In order to see the current status of the Network Manager service you can use the following CLI command.
systemctl status NetworkManager
Stopping Network Manager service
Stopping the Network Manager service is just a matter of executing the right CLI command, see below.
systemctl stop NetworkManager
Permanently disable Network Manager
Once you’ve stopped the Network Manager service you can proceed to disable it permanently using the following CLI command.
systemctl disable NetworkManager
Check if Network Manager is disabled
If you are like me, you are happy double checking things, then use the following CLI command to be absolutely sure that Network Manager has been disabled.
systemctl list-unit-files | grep NetworkManager
Network Script
As you probably know the network script containing all the network related data is located in the following path:
/etc/sysconfig/network-scripts/ifcfg-enp0s3
You can make use of the “find” command with the interface name previously found “enp0s3” as follow to get the path to the network script.
find / -name *-enp0s3
Updating the Network Script
Once you’ve located the Network Script you must change it manually to reflect the new settings, from now on the Network Manager is no longer in charge.
Restart Network
systemctl restart network
Connectivity check using ping
The last step would be to check the connectivity and for that we can perfectly use “ping” if you’re able to reach WAN sites that mean that the network settings now static are OK and Network Manager has been sueccesfully disabled.