Linux Networking

Configure static IP on Linux

Give servers and appliances stable IPs — netplan examples you can adapt.

14 min read Intermediate Updated 9 Jun 2026

Step-by-step guide

Work through each section in order. Stop when your issue is resolved — you do not need every step for every situation.

Warning

Use a sudo-capable account, keep shell history for audit, and back up critical paths before changing boot, SSH, or package state.

What you will achieve

Give servers and appliances stable IPs — netplan examples you can adapt.

1) Find interface and current config

ip -br a
ip route

2) Configure netplan on Ubuntu 22.04/24.04

sudo nano /etc/netplan/01-static.yaml
sudo netplan try
sudo netplan apply

3) Verify route and DNS

ip a
ip route
resolvectl status

Related guides

linux netplan static ip