AlmaLinux / Rocky Linux 9/10 instructions

Post Reply
User avatar
Edge100x
Founder
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

Post by Edge100x »

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.
User avatar
Edge100x
Founder
Founder
Posts: 13226
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: AlmaLinux / Rocky Linux 9/10 instructions

Post by Edge100x »

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,
  1. 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).
  2. You should see your existing primary IP on one of the lines of this file, starting with "address1", in a format like this:

    Code: Select all

    address1=ip.add.re.ss/netmask,g.ate.w.ay
    for instance, it might say:

    Code: Select all

    address1=192.168.1.1/24,192.168.1.254
    Replace the IP address with the new one and the gateway with the new one.
    If you have a secondary IP address, it should be under address2, and so on.
  3. Save the file and exit.
  4. Reboot the VDS with the "reboot" command.
Post Reply