Setting static ip address in ubuntu server os

I am new to ubuntu server.
I am using rockpi4b-ubuntu-bionic-minimal-20190104_2101-gpt ubuntu server os in rock pi 4B v1.3.
I am trying to set static ip but /etc/netplan folder not available.
I tried sudo netplan generate also but showing error command not found.
anyone help me for setting static ip address.

Thanks
Vasu

step1) edit the file:/etc/network/interfaces, add static ip config
sudo vi /etc/network/interfaces
#add the static ip config
auto eth0
iface eth0 inet static
address 192.168.3.240
gateway 192.168.3.1
netmask 255.255.255.0
dns-nameservers 223.5.5.5 223.6.6.6

step2) restart the network
systemctl restart networking.service

1 Like