Frequently Asked Question

Changing IP Address (or setting a static IP) on RHEL 10 / Alma / Rocky Linux
Last Updated 22 hours ago

To update the IP Address of an interface using NetworkManager, first identify the interface with

sudo nmcli device status

Then update your device, in our example it's ens18 as below exchanging your own IP addresses and DNS servers of course. 

sudo mcli con mod ens18 ipv4.address 10.1.1.198/24

sudo nmcli con mod ens18 ipv4.gateway 1 10.1.1.2

sudo mcli con mod ens18 ipv4.dns "10.1.1.5 10.1.1.4"

sudo nmcli con mod ens18 ipv4.method manual

sudo mcli con up ens18


Will return something like 

Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveComnection/3)

And the new IP Address will be in effect. You can check the status of the interface using

sudo nmcli device show ens18
This website relies on temporary cookies to function, but no personal data is ever stored in the cookies.
OK
Powered by GEN UK CLEAN GREEN ENERGY

Loading ...