Ubuntu server 18.04 network configuration
In ubuntu 18.04 network configuration was replaced by netplan
To configure network with statik ip we create file
/etc/netplan/01-netcfg.yaml
network: version: 2 renderer: networkd ethernets: enp2s0: dhcp4: no dhcp6: no addresses: [192.168.0.224/24] gateway4: 192.168.0.1 nameservers: addresses: [192.168.0.240]
Delete default file with dhcp network. Caution: DON’T USE TAB, ONLY SPACE’S
rm /etc/netplan/50-cloud-init.yaml
And apply plan
netplan apply
Profit!!!