On latest releases of Rocky, AlmaLinux, CentOS operating systems, the old ifup
and ifdown
commands are not installed by default. This change is because network interfaces are now managed by NetworkManager instead of traditional network scripts.
To fix the error “ifup: command not found” or “ifdown: command not found” on RHEL-based systems, you need to install the package that provides the commands.
sudo dnf search network-scripts
In the output, you’ll see:
Last metadata expiration check: 0:34:08 ago on Mon 28 Apr 2025 10:40:44 PM EAT.
============================================================================================================= Name Matched: network-scripts ==============================================================================================================
network-scripts-openvswitch2.16.x86_64 : Open vSwitch legacy network service support
============================================================================================================ Summary Matched: network-scripts ============================================================================================================
NetworkManager-initscripts-updown.noarch : Legacy ifup/ifdown scripts for NetworkManager that replace initscripts (network-scripts)
If using NetworkManager install NetworkManager-initscripts-updown package.
sudo dnf install NetworkManager-initscripts-updown
Press y to accept the installation:
Dependencies resolved.
==========================================================================================================================================================================================================================================================
Package Architecture Version Repository Size
==========================================================================================================================================================================================================================================================
Installing:
NetworkManager-initscripts-updown noarch 1:1.48.10-8.el9_5 baseos 20 k
Transaction Summary
==========================================================================================================================================================================================================================================================
Install 1 Package
Total download size: 20 k
Installed size: 2.1 k
Is this ok [y/N]: y
If using Open vSwitch, install network-scripts-openvswitch2
package:
sudo dnf install network-scripts-openvswitch*
Confirm it exist now:
$ which ifup
/usr/sbin/ifup
$ which ifdown
/usr/sbin/ifdown