The latest version of Ubuntu server has moved management of IP information from /etc/network/interfaces into a YAML file located here: /etc/netplan/
Example static IP address set below:
Step 1:
Edit the file: /etc/netplan/50-cloud-init.yaml
Set the IP to: 192.168.100.201
network: ethernets: enp3s0: dhcp4: no addresses: [192.168.100.201/24] gateway4: 192.168.100.1 optional: true nameservers: addresses: [8.8.8.8] version: 2
Step 2:
Apply the change, run the command:
netplan apply