I found the only way to reliabily set ips is to use nmtui which does all
the deeper work for you...
1. Make sure NetworkManager is running:
sudo systemctl status NetworkManager
2. Start nmtui:
sudo nmtui
3. In the menu, choose:
"Edit a connection"
4. Select your network interface (e.g. "Wired connection 1").
5. Set IPv4 Configuration to:
Manual
6. Enter your static settings:
Address: 192.168.x.x/24
Gateway: 192.168.x.1
DNS: 1.1.1.1
7. Select OK to save.
8. Go back to the main menu and choose:
"Activate a connection"
9. Deactivate your connection, then activate it again to apply changes.
10. Verify:
ip addr
ip route
On Mon, 1 Dec 2025, 09:49 rm via Hampshire, <hampshire@???>
wrote:
> Hi all
>
> How do I set the static IP address of an Ubuntu (server 25.10)
> machine? Some googling tells me I need to edit dhcp.conf or netplan -
> neither of which are there.
>
> I'm trying to upgrade my cluster. I've created a microSD image with
> Ubuntu 25 on it and configured the image (before inserting the card into
> the pi) to have the correct hostname and to enable SSH. Trouble is - I
> need it to have a static IP such that I can ssh into it "headless"
>
> Previously, I've got one card 99% configured (all but hostname and ip
> address), then cloned the card and used the gui to make the appropriate
> changes. Ideally (given the pi's done really like kvm switches in my
> experience) I'd like to do this all headless.
>
> I've mounted the card image on my PC (which also runs Ubuntu) so I can
> see the card's /etc but, as I say, there's no dhcp.conf and /etc/netplan
> is empty.
>
> There must be a way to do this - anyone know the winning formula?
>
>
> Cheers
>
> R
>
>
> --
> Please post to: Hampshire@???
> Manage subscription: https://mailman.lug.org.uk/mailman/listinfo/hampshire
> LUG website: http://www.hantslug.org.uk
> --------------------------------------------------------------
>
--
Please post to: Hampshire@???
Manage subscription:
https://mailman.lug.org.uk/mailman/listinfo/hampshire
LUG website:
http://www.hantslug.org.uk
--------------------------------------------------------------