Ubuntu‐IP‐Setup - ConnorEast/Tech-Journal GitHub Wiki

Setting A Static IP on a Ubuntu Server

Once you have created a new Ubuntu server, you should have access to the “Network connections” page. Below is an image of the DHCP configured settings.

image

On said page go to the ethernet address specified for your device, in this case ens160, and press enter. In the new popup tab select Edit IPv4. On the “Edit ens160 IPv4 Configuration” page change the IPv4 method from DHCP to manual. This should bring up the following page.

image

Based on the DHCP assigned address I chose the subnet X.X.X.0/25, with an address of X.X.X.250. I then hit “Save” and “Done”. I then continued to hit “done” until I got the popup “Confirm Destructive Action”. On this page I hit “Continue” and entered the device information. Next I restarted the terminal. At this point I logged in using Connor and Ch@mpl@1n22!. From there I used the “IFconfig” command to check the address in order to confirm it was attached.

image

After seeing this I used the “ping 8.8.8.8” command to confirm accessibility to the internet. Next I needed to edit the IP from the terminal. Use the command “vi /etc/netplan/50-cloud-init.yaml”. From here press “I”, edit the address to 192.168.201.21 and then press “esc”, and type “:wq!”. Once the document was saved I used the reboot command and logged back in.

image
image