Network Manager current status
In case you are not sure if the Network Manager is being used or not on your system then you can check its current status using the following CLI command.
systemctl status NetworkManager
Identifying manged network interfaces
Use the following CLI command to check which are the interfaces that are currently being managed by the NetworkManager.
nmcli device status
The command displays a table that lists all network interfaces along with their STATE. If Network Manager is not controlling an interface, its STATE will be listed as unmanaged. Any other value indicates the interface is under Network Manager control, the one which concern to us is enp0s3.
Stop the NetworkManager service
Before being able to disable the Network Service, it is no longer needed because all the network related settings are manually configured and the IP address is static, you must first stop the Network Manager service, see CLI command below.
systemctl stop NetworkManager
Permanently disable the Network Manager service
systemctl disable NetworkManager
Double check that Network Manager is disabled
systemctl list-unit-files | grep NetworkManager
Update network script
Open the network script and add the following parameter.
The network script containing all the network settings is called “ifcfg-enp0s3” and is located at the following path.
Restart network service
systemctl restart network