News about our company, tutorials about IT and much more you will find in this page.
Configuring a static IPv4 address in AlmaLinux 9 can be achieved by using nmtui and nmcmcli. This guide covers each method step-by-step.
The nmtui
tool provides a simple interface to configure network settings.
Open a terminal and type:
sudo nmtui
Wired connection 1
).192.168.1.100
192.168.1.1
8.8.8.8, 8.8.4.4
nmtui
. sudo nmcli connection down <connection_name> && sudo nmcli connection up <connection_name>
Verify the configuration:
ip a
ping google.com
The nmcli
tool allows for direct configuration of network settings.
List all connections:
nmcli connection show
Note the connection name (e.g., Wired connection 1
).
Replace <connection_name>
, <static_IP>
, <gateway>
, and <DNS>
with your network details:
sudo nmcli connection modify <connection_name> ipv4.addresses <static_IP>/24
sudo nmcli connection modify <connection_name> ipv4.gateway <gateway>
sudo nmcli connection modify <connection_name> ipv4.dns "<DNS>"
sudo nmcli connection modify <connection_name> ipv4.method manual
Example:
sudo nmcli connection modify "Wired connection 1" ipv4.addresses 192.168.1.100/24
sudo nmcli connection modify "Wired connection 1" ipv4.gateway 192.168.1.1
sudo nmcli connection modify "Wired connection 1" ipv4.dns "8.8.8.8,8.8.4.4"
sudo nmcli connection modify "Wired connection 1" ipv4.method manual
Bring the connection down and back up:
sudo nmcli connection down <connection_name>
sudo nmcli connection up <connection_name>
Check the IP settings:
ip a
Test connectivity:
ping google.com
AlmaLinux 9 provides multiple ways to configure a static IPv4 address, nmtui is beginner-friendly and nmcli is powerful for scripting and command-line usage. Choose the method that fits your comfort level and use case.
If you encounter any issues or have questions, feel free to ask for help using our method of contact.
If you are interested in https://blog.evoluso.com/how-to-set-up-a-static-ipv4-address-in-ubuntu-24/