Ubuntu 22.x Configurations

Network Configuration by netplan

For Example we want to set IPv4 on our ubuntu machine, here is a sample of yml file

  version: 2
  renderer: networkd
      dhcp4: false
      dhcp6: false
      - to: default
       addresses: []

In the above configuration:

  • eth0 – is the network interface name
  • addresses – is used to configure IPv4 address on an interface. Make sure to define CIDR. You can add multiple addresses here
  • nameservers – Set the name servers here. and are Google’s name servers
  • routes – This is used to set gateway on your system.

Make sure the IPv4 address belongs to the system network and has the correct gateway Ip address. Once confirmed, save file content and close it.

after editing yml file which should be exist in this path /etc/netplan, should run these 2 commands:

sudo netplan generate
sudo netplan --debug apply

Nginx – Apache

check status of services:

systemctl status apache2
systemctl status nginx

Leave a Reply

Your email address will not be published. Required fields are marked *