You would need to edit interfaces in /etc/network/interfaces
Not on RPiOS Bullseye*, Bookworm or Trixie (That's any release in roughly the last five years).
Bullseye uses dhcpcd (so edit dhcpcd.conf and your nmcli commands won't work either), Bookworm and Trixie use Network Manager and do not even have the necessary packages installed.
@OP:
You have options:
- Enable internet connection sharing on your PC. Things should just work.
- Set static IP addresses in the same subnet for the ethernet interfaces on PC and Pi. Use a different subnet to the one in use by your wifi.
- Enable link local addressing on the PI's ethernet interface. Your windows box should enable that automatically if ICS is off and teh Pi is not running a DHCP server (which it won't be unless you've configured it to).
You may also want to look at Bookworm, Point to Point Ethernet (inc g_ether),
*: IIRC you can use /etc/network/interfaces[.d] on Bullseye but you then need to configure every interface as, it it's present dhcpcd assumes all interfaces are configured there.
Statistics: Posted by thagrol — Mon Jan 26, 2026 1:11 am