Network info from google
n Red Hat Enterprise Linux (RHEL) 10, manage basic networking primarily
using nmcli (command-line) or nmtui (text interface) to control NetworkManager. Key changes include the removal of ifcfg file support, favoring key files in /etc/NetworkManager/system-connections/. The dhclient tool is also replaced by an internal DHCP client.Key Networking Commands and Tasks (RHEL 10)
- View Network Status:
ip a: View IP addresses and interface status.nmcli device status: Check device states.nmcli connection show: List active network profiles.
- Configure Networking (DHCP):
nmtui: Open the text-based user interface to edit connections.nmcli con add type ethernet con-name <name> ifname <interface>: Create a new DHCP connection.
- Configure Static IP:
nmcli con mod <connection> ipv4.addresses <ip/mask> ipv4.gateway <gateway> ipv4.method manual: Sets static IP.nmcli con mod <connection> ipv4.dns "8.8.8.8": Sets DNS servers.nmcli con up <connection>: Apply changes.
- Troubleshooting:
ping <host>: Test connectivity.ip route: View routing table.nmcli dev connect <interface>: Reconnect an interface.
- Hostname:
hostnamectl set-hostname <new_name>: Change the system hostname.
RHEL 10 fully deprecates the older
/etc/sysconfig/network-scripts/ format. Always use nmcli or nmtui to ensure configurations are properly saved in the new key file format.