AlmaLinux / Rocky Linux 9/10 instructions
- Edge100x
- Founder

- Posts: 13226
- https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
- Joined: Thu Apr 18, 2002 11:04 pm
- Location: Seattle
- Contact:
AlmaLinux / Rocky Linux 9/10 instructions
To change the IPs in AlmaLinux / Rocky Linux version 9 or 10, log in to your server through SSH or the "VNC Console" page in the control panel, and then use the nmtui command for a menu-driven system. You can use enter to select the "enX0" interface, then use tab and enter to move between fields and make the necessary edits.
Re: AlmaLinux / Rocky Linux 9/10 instructions
You can also edit the IPs by hand. For instance, if you need to edit the main IP for the machine after a location change,
- Open the file /etc/NetworkManager/system-connections/enX0.nmconnection in your favorite text editor (if you are new to text editing on Linux, we recommend installing nano with yum install nano and then running the command nano /etc/NetworkManager/system-connections/enX0.nmconnection).
- You should see your existing primary IP on one of the lines of this file, starting with "address1", in a format like this:
for instance, it might say:
Code: Select all
address1=ip.add.re.ss/netmask,g.ate.w.ayReplace the IP address with the new one and the gateway with the new one.Code: Select all
address1=192.168.1.1/24,192.168.1.254
If you have a secondary IP address, it should be under address2, and so on. - Save the file and exit.
- Reboot the VDS with the "reboot" command.