1

And I know the title seems like dumb, But after some try I think I get into struggle with ubuntu server 22.04 minimal install:

When installing and first boot up, Everything working fine, But soon I notice there is no iproute2 installed. After install I reboot the system.

After reboot. Network is gone. Yes, gone.

I manually using iproute2 to config networking:

PS: ip is fake

ip link set dev ens160 up
ip address add dev ens160 10.0.0.50/24
ip route add 10.0.0.1 dev ens160
ip route add default via 10.0.0.1

Then

ping 1.1.1.1

Oh, come on. Ping is not even installed. Then I try to apt update but get an working 0% failed.

Question: How to config network in ubuntu server 22.04 ?

Should I just install netplan when first boot ?

Edit1: Something wired happend,I create another VM and do same install process, Ping and IPRouter2 netplan exist after install. And no matter how reboot , netplan will handle the networking

I can't reproduce this behiver again

Alceatraz
  • 111
  • 1
    Some of us found the same thing with Ubuntu server "minimal". It isn't really meant for human interaction and the terminal is pretty useless. Install via the other option, just don't select anything else to be installed. It is only about 400 megabytes larger and has basic things like normal log files and nano and ping and such. See this forums thread for more details. – Doug Smythies May 09 '22 at 05:11
  • 1
    Ubuntu Minimal server images are designed to be run on cloud/VM/LXD, where virtual networking details are provided by a host system or default config file. Which kind of host you are trying to run it on? Or are you trying to run it on bare metal? – user535733 May 09 '22 at 11:09

1 Answers1

0

For server, I prefer ifupdown and edit /etc/network/interfaces. Netplan is a higher-level tool, which generates config for ifupdown / networkmanager. You don't need to use it if you want to keep your server minimal.

See Ubuntu 18.04: switch back to /etc/network/interfaces

xpk
  • 176