Setting up a static ip address on an Ubuntu 18.04 server is described in detail on this webpage. To abbreviate, however, you have to do the following:
Find the name of the network card you want to modify by using ip link.
Go to the /etc/netplan folder in your server, which will contain a .yaml file for the network configuration.
Edit the .yaml file, adding an entry for the network card under ethernets:. In that entry, disable dchp4 and manually enter the IP address you wish for the network card to have along with the gateway IP and nameservers.
Save your changes, and then apply the network changes using sudo netplan apply.
Setting up a static ip address on an Ubuntu 18.04 server is described in detail on this webpage. To abbreviate, however, you have to do the following:
ip link
./etc/netplan
folder in your server, which will contain a.yaml
file for the network configuration..yaml
file, adding an entry for the network card underethernets:
. In that entry, disable dchp4 and manually enter the IP address you wish for the network card to have along with the gateway IP and nameservers.sudo netplan apply
.