Monthly Archive: September 2018

How to add a static IP in Ubuntu 18x

First things first, as sudo run ifconfig and get the ethernet adapter name.  Some are eth0, eth1, ect ect.

Then add a file in /etc/netplan and call it 01-netcfg.yaml

(Make it look something like this:

# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
 version: 2
 renderer: networkd
 ethernets:
   ens33:
     dhcp4: no
     dhcp6: no
     addresses: [192.168.1.2/24]
     gateway4: 192.168.1.1
     nameservers:
       addresses: [8.8.8.8,8.8.4.4]

Save that file and then type netplan apply.

That will do it!