Your cart is currently empty!
How To Configure Static IP Address In Ubuntu 22.04 (Easy Guide)
Setting a static IP address in Ubuntu 22.04 ensures your device always uses the same IP on your network. This is essential for servers, remote access, and stable connections in networked environments.
In this guide, you’ll learn two simple methods to set a static IP:
- Using Netplan (default for Ubuntu 22.04)
- Using the GUI (for desktop users)
Method 1: Configure Static IP via Netplan (Command Line)
Ubuntu 22.04 uses Netplan as the default network configuration tool.
Step 1: Check your network interface name
Open the terminal and run:
ip link
You’ll see something like:
2: enp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> ...
Here, enp3s0
is your network interface name.
Step 2: Open the Netplan config file
sudo nano /etc/netplan/01-netcfg.yaml
If you don’t see this file, look for others in /etc/netplan/
.
Step 3: Edit configuration
Replace the contents with your static IP settings (update values for your network):
network:
version: 2
ethernets:
enp3s0:
dhcp4: no
addresses:
- 192.168.1.100/24
gateway4: 192.168.1.1
nameservers:
addresses:
- 8.8.8.8
- 8.8.4.4
- addresses: Your desired static IP with subnet (e.g.,
/24
for 255.255.255.0) - gateway4: Your network’s default gateway
- nameservers: DNS server addresses
Step 4: Apply changes
sudo netplan apply
Check your new IP:
ip addr show enp3s0
✅ Done! Your static IP is now configured.
Method 2: Configure Static IP via GUI (Ubuntu Desktop)
If you’re using Ubuntu Desktop 22.04, you can set a static IP without touching the terminal.
Step 1: Open Network Settings
- Click the Network icon in the top-right corner.
- Select Settings.
Step 2: Edit your network
- Choose your Wired or Wi-Fi connection.
- Click the gear icon next to it.
Step 3: Set Manual IP
- Go to the IPv4 tab.
- Switch Method to Manual.
- Enter:
- Address:
192.168.1.100
- Netmask:
255.255.255.0
- Gateway:
192.168.1.1
- DNS:
8.8.8.8, 8.8.4.4
- Address:
- Click Apply.
Step 4: Reconnect
Turn the connection off and on again, or reboot to apply the static IP.
Tips & Troubleshooting
- Make sure your chosen IP is not already in use to avoid conflicts.
- Use
ping google.com
to confirm internet connectivity. - If you lose network access, revert the changes by enabling DHCP again.
Final Thoughts
Whether you’re hosting a web server, running a NAS, or simply want stable remote access, setting a static IP address in Ubuntu 22.04 is quick and easy with either the Netplan method or the GUI method.
Now you can enjoy consistent network connectivity without worrying about your IP changing.
Tech enthusiast and content creator passionate about making technology simple for everyone. I share practical tips, guides, and reviews on the latest in computers, software, and gadgets. Let’s explore the digital world together!