NetworkManager is an essential tool for managing network connections on AlmaLinux 9. It simplifies the process of configuring, maintaining, and troubleshooting network connections. In this guide, we will walk you through how to install NetworkManager, manage it (start, restart, and stop), troubleshoot common issues, and provide essential commands to ensure that your network is running smoothly.
How to Install NetworkManager in AlmaLinux 9
If NetworkManager is not installed on your AlmaLinux 9 system, follow the steps below to install it.
Step 1: Check if NetworkManager is Installed
To check if NetworkManager is already installed, run the following command:
sudo dnf list installed | grep NetworkManager
Step 2: Install NetworkManager
If it is not installed, use the following command to install NetworkManager:
sudo dnf install NetworkManager
Managing NetworkManager
Starting NetworkManager
To start NetworkManager and ensure that it runs automatically at boot, use the following commands:
sudo systemctl start NetworkManager
sudo systemctl enable NetworkManager
Restarting NetworkManager
If you need to restart the service to apply new network configurations, run the following command:
sudo systemctl restart NetworkManager
Stopping NetworkManager
To stop NetworkManager, use this command:
sudo systemctl stop NetworkManager
Checking NetworkManager Status
To check the current status of NetworkManager, use the following command:
sudo systemctl status NetworkManager
NetworkManager Troubleshooting
If you encounter network issues, NetworkManager has built-in tools to help you troubleshoot.
Step 1: Check Network Interface Status
Verify the status of your network interfaces by running the following command:
ip a
If the interface is down, bring it up with:
sudo ip link set dev [interface] up
Step 2: Restart Networking Services
If your network is still not functioning properly, try restarting the network services:
sudo systemctl restart NetworkManager
Step 3: Verify NetworkManager Connectivity
You can also test network connectivity with a ping test:
ping 8.8.8.8
Additional Useful Commands
Enable ICMP (Ping) in Firewall
If your server blocks ping requests, enable it by running:
sudo firewall-cmd --permanent --add-icmp-block-inversion
sudo firewall-cmd --reload
Check Active Network Connections
To view the currently active network connections, run:
nmcli connection show
Restarting a Specific Network Connection
To restart a specific network connection, use the following command:
nmcli connection up [connection-name]
List Available Network Devices
To list all network devices, run:
nmcli device status
Benefits of Using NetworkManager in AlmaLinux 9
NetworkManager offers several advantages for managing network connections on AlmaLinux 9:
- It simplifies the management of network interfaces, making it easier for users to configure and control networking settings.
- It supports automatic detection and configuration of network interfaces, reducing the need for manual intervention.
- NetworkManager can manage multiple connections and automatically switch between them, ensuring continuous connectivity.
- It offers tools for troubleshooting and monitoring network issues, helping users maintain a stable network environment.
By following the steps and commands outlined in this guide, you should be able to efficiently install, manage, and troubleshoot NetworkManager in AlmaLinux 9, ensuring a seamless networking experience.