How to Change the IP Address of a Virtual Machine in AlmaLinux
cloudinfrastructurelinux
- Edit the ip of a connection
nmcli con modify <connection_name> ipv4.addresses <ip_address>
- Edit the gateway of a connection
nmcli con modify <connection_name> ipv4.gateway <gateway_address>
- Edit the DNS of the connection
nmcli con modify <connection_name> ipv4.dns <dns_address>
- Edit the DNS ip asignation method to manual
nmcli con modify <connection_name> ipv4.method manual
- Reboot the connection
nmcli con down <connection_name> && nmcli con up <connection_name>
- Reboot the system
systemctl reboot