Share your love
Restart Network Service on AlmaLinux 9 and RHEL 9 – Easy Guide Steps
This tutorial will show you how to Restart Network Service on AlmaLinux 9 and RHEL 9. After you make changes to your IP configuration, you need to restart your network service to apply the changes.
You can easily restart network service by using the different Linux Commands. For this purpose, follow the steps below to get familiar with some of these commands that are used to Restart Network Service on AlmaLinux 9 and RHEL 9.
Steps To Restart Network Service on AlmaLinux 9 and RHEL 9
To complete this guide, you must have access to your server as a root or non-root user with sudo privileges. For this purpose, you can visit the Initial Server Setup guide on AlmaLinux 9.
Warning: Remember to not turn off the network services in remotely connected systems. This will cause you to lose the connection.
Step 1 – General ifconfig Command – Bring Network Interface up and down
At this point, you can use a general method that is used for the network interfaces. The ifconfig command can used to bring a network interface up or down.
Then, you can list your network interfaces on AlmaLinux 9 and RHEL 9 by using the command below:
sudo ifconfig -a
If you plan to turn off a network interface, you can use the command below:
sudo ifdown network-interface-name
Also, you can use the command below to turn on a network interface:
sudo ifup network-interface-name
Step 2 – Restart Network Service with NetworkManager on RHEL 9
NetworkManager service can be used to restart the Network services in RHEL 9 and AlmaLinux 9. At this point, you can easily use the following systemctl command to restart your network services:
sudo systemctl restart NetworkManager.service
Step 3 – Restart Network Services with nmcli Tool on RHEL 9
At this point, you can use another tool named nmcli that is used to manage NetworkManager on AlmaLinux 9 and RHEL 9.
To turn off and turn on your network services with the nmcli tool, you can use the commands below:
# sudo nmcli networking off
# sudo nmcli networking on
Conclusion
At this point, you have learned to use different Linux commands to turn off or turn on a network interface and Restart Network Service on AlmaLinux 9 and RHEL 9.
Hope you enjoy it. Need any help or suggestions? Please comment for us.
Also, you may be interested in these articles:
How To Configure Networking on AlmaLinux