Set a static IP address on Ubuntu server 22.04

4 April 2023

Set a static IP address on Ubuntu server 22.04

In this example, we will set a static IP address on the Ubuntu 22.04 server to 192.168.1.202/24 with default gateway to 192.168.1.1 and DNS servers 8.8.8.8, 8.8.4.4, and 192.168.1.1.

  1. Locate and edit with administrative privileges the /etc/netplan/01-network-manager-all.yaml file with the following configuration. Update your desired static IP address, DNS server and gateway where appropriate.
sudo nano /etc/netplan/01-network-manager-all.yaml

To apply the new Netplan changes, execute:

sudo netplan apply

Alternatively, if you run into some issues run:

sudo netplan --debug apply
Table of Contents

Leave a Reply

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

Similar Content

23 January 2021
Introduction to the new how-to article in the Knowledge Base.

I wrote a new guide on setting up your own live-stream server. Mostly due to your requests. I took the opportunity to simplify and shorten the guide a bit. If you follow this guide step by step, and use your brain a tiny bit, you'll be fine. This guide has so far been tested on […]

× Read More ×
19 June 2025
Choosing the live-stream host that suits your needs

Discover how to choose the right live-stream host for your organization. Compare popular platforms like DaCast, Wowza, Vimeo, Kick, ReStream and IBM.

× Read More ×
Copyright © 2025. 
All rights reserved.