First things first, as sudo run ifconfig and get the ethernet adapter name. Some are eth0, eth1, ect ect.
Then add a file in /etc/netplan and call it 01-netcfg.yaml
(Make it look something like this:
# This file describes the network interfaces available on your system # For more information, see netplan(5). network: version: 2 renderer: networkd ethernets: ens33: dhcp4: no dhcp6: no addresses: [192.168.1.2/24] gateway4: 192.168.1.1 nameservers: addresses: [188.8.131.52,184.108.40.206]
Save that file and then type netplan apply.
That will do it!