How to disable NetworkManager in RHEL 8 ?
環境
Red Hat Enterprise Linux (RHEL) 8
問題
What steps are needed to disable the NetworkManager service?
決議
At first, please note that the old
networks-scripts
have been deprecated and are not the defaults anymore.
-
belongs to theifup
NetworkManager
package by default.
Raw
# readlink $(which ifup) /etc/alternatives/ifup # readlink $(readlink $(which ifup)) /usr/libexec/nm-ifup
- You can change this behaviour by installing the package below. After that, the ifcfg configurations will be handled by the
Rawnetwork.service
# yum install network-scripts # readlink $(readlink $(which ifup)) /etc/sysconfig/network-scripts/ifup
-
Be aware that you'll get a warning on deprecation:
Raw
# ifup ens3 WARN : [ifup] You are using 'ifup' script provided by 'network-scripts', which are now deprecated. WARN : [ifup] 'network-scripts' will be removed in one of the next major releases of RHEL. WARN : [ifup] It is advised to switch to 'NetworkManager' instead - it provides 'ifup/ifdown' scripts as well.
-
If you are annoyed by this warning, you can disable them at your own risk:
Raw
# touch /etc/sysconfig/disable-deprecation-warnings
- After that, you should be able to do the same configuration as on your RHEL 7:
- Stop and disable the NetworkManager
# systemctl stop NetworkManager # systemctl disable NetworkManager
- Add the
parameter to yourNM_CONTROLLED="no"
files to ensure that NetworkManager won't handle your device, where/etc/sysconfig/network-scripts/ifcfg-<DEV>
is your network interface card (e.g. eth0, ens3, enp2s0f0, ...).<DEV>
- Use the
instead ofnetwork.service
. For example:NetworkManager.service
# systemctl status network