How to restart network in Almalinux 8/9 / RHEL 8/9

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.

 

Cloud and Dedicated Servers
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:

  1. Reload the connection
    nmcli connection reload
  2. 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.

  3. 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

 

 

  • rhel, almalinux, network
  • 3658 Users Found This Useful
Was this answer helpful?

Related Articles

How to reinstall an OS on my server?

If you already have an OS installed on your server and want to change or reinstall it, you can do...

How to set rDNS records for my dedicated server IPs?

You can update rDNS records of your server IPs from Client Area (One Portal) Log in to your...

How to set a rDNS/PTR record for my VPS?

Please open a support ticket and provide the rDNS record that you want to set and the IP address...

How DDoS protection works on a VPS?

Our DDoS mitigation system is powered by AI and is local with reduced latency. It can mitigate...

How many IPs I can add to my VPS?

The max IPv4 allocation for a VPS is 2 IPs. So you can add 1 additional IPv4 to your VPS.