Find best webhosting in chennai

Location

Chennai

Working Hours

09:00 AM to 07:00 PM ( Mon - Sat )

Phone Number

(+91) 9884800300

How to restart and check the status of the NetworkManager service in AlmaLinux 8?

To restart and check the status of the NetworkManager service in AlmaLinux 8, you can use the systemctl command, which is used to manage system services.

Keeping an operating system running smoothly requires managing network connections. AlmaLinux 8 is a popular Linux distribution that manages network setups through the NetworkManager service. In this article, we will explain how to restart and check the NetworkManager service in AlmaLinux 8.

For this  You’ll need administrative privileges (root access) to restart and check the NetworkManager service status in AlmaLinux 8.

Here’s how you can do it:

Steps to restart the NetworkManager Service:

Step 1. Login into your server as a root user.

Step 2. Run the following commands to restart the NetworkManager Service.

# sudo systemctl restart NetworkManager

 

You can restart the NetworkManager service by running this command with root access. This step is necessary when you need to update network configurations, troubleshoot network connectivity issues, or validate that the service is operating with the most recent settings.

Steps to check the status of the NetworkManager Service:

Step 1. Login into your server as a root user.

Step 2. Run the following command in the terminal to check the status of the NetworkManager service,

# sudo systemctl status NetworkManager

NetworkManager service

 

In the output, you will see detailed information on the service, such as whether or not it is active, as well as any important error messages. The “Active” line indicates whether the NetworkManager service is active. You also get helpful information such as the process ID (PID) of the service, memory usage, and recent log entries.

Other than the above steps you can also use below commands to restart the network.

To turn the network completely off and back on in AlmaLinux, we can use the following NetworkManager commands. This effectively restarts the network for the operating system.

# nmcli networking off

# nmcli networking on

We can even turn off and on back individual network interfaces. To see the currently configured interfaces, you can use the "ip a" command.

or

ip addr sh

NetworkManager service

 

In this case, the interface we have to reset is "enp2s0f0". The below commands will take the interface down and put on back up, effectively restarting

# ifdown enp2s0f0

Connection 'enp2s0f0' successfully deactivated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/5)

And then put it back up:

# ifup enp2s0f0

One last way would be to reset a network interface in AlmaLinux with the ip link commands. This work through the networkd.

# sudo ip link set enp2s0f0 down

# sudo ip link set enp2s0f0 up

Use the below command to restart the server networking service.

# nmcli networking off

# nmcli networking on

Conclusion

The NetworkManager service can be restarted and checked to ensure that network connectivity remains stable and troubleshoots any problems that may occur in AlmaLinux 8. In order to maintain a reliable network connection on your AlmaLinux 8 system, follow the steps outlined in this guide to restart the service and verify its status

To know How to Kill a Process in Linux from Command Line click here.