This article is dedicated to RHEL8/9 - AlmaLinux 8/9.
After you make changes to the network interface configuration, it's crucial to restart the network, or in our case, the configured interface, for the changes to take effect.
Premium Cloud servers and Dedicated servers from HostRound with 100% uptime and 24/7 support.
Prerequisites
- Server root access is required.
- We'll use NetworkManager
nmcli
tool (included by default)
Note: cPanel servers on Almalinux 8 don't have access to NetworkManager. - Assuming your interface name is eno1. Replace eno1 with your interface name.
Follow the steps below to restart the network interface:
- Reload the connection
nmcli connection reload
- Restart the interface eno1
nmcli connection up ifname eno1
Replace eno1 with your interface name.
- OR -
nmcli device down eno1;nmcli device up eno1
Replace eno1 with your interface name. - Done. The network device/interface has been restarted.
How to know the network interface/device name?
The interface name is different on each server, but you can easily know your interface name by using the command ip link show
or by NetworkManager cli tool.
To show active connections:
nmcli connection show
You'll find the Device name and connection UUID in the output.
You can bring a connection Up/Down using the UUID not only the device or interface name.
You can do so with the following command:
nmcli connection up {UUID}
Replace {UUID}
with the actual connection UUID.
To show configured interfaces with detailed information:
nmcli device show
This will show detailed information about the active devices/interfaces with assigned IPs.
To show the device/interface status
nmcli device status