How To

How to Configure Static IP on Ubuntu Settings Easily

Setting up a Static IP on Ubuntu configuration is essential for servers, remote access systems, media servers, and devices that require a permanent network address. By default, Ubuntu receives IP addresses dynamically from a DHCP server, but many advanced networking tasks work better with a fixed IP.

Whether you manage an Ubuntu server or desktop machine, configuring a static IP improves stability and simplifies remote connectivity.

Why Use a Static IP on Ubuntu Configuration

Dynamic IP addresses can change after router reboots or network reconnects. This may interrupt SSH access, port forwarding, DNS records, or locally hosted services.

A static IP solves these issues by assigning a permanent address to your Ubuntu system. It is especially useful for:

  • Web servers
  • NAS systems
  • Home labs
  • Remote desktop access
  • Docker and virtualization setups

Ubuntu uses Netplan for network management on modern releases, making static IP configuration more consistent across systems.

Static IP Setup on Servers

Before assigning a static address, identify your network interface name using:

ip link

Ubuntu systems often use interface names such as ens3, enp0s3, or eth0.

Next, locate the Netplan configuration file:

ls /etc/netplan/

Open the YAML file with a text editor:

sudo nano /etc/netplan/01-netcfg.yaml

A basic static IP configuration may look like this:

network:  version: 2  renderer: networkd  ethernets:    ens3:      dhcp4: false      addresses:        - 192.168.1.50/24      routes:        - to: default          via: 192.168.1.1      nameservers:        addresses:          - 8.8.8.8          - 1.1.1.1

Make sure the indentation remains correct because YAML formatting is strict.

Before applying changes permanently, test the configuration safely:

sudo netplan try

If everything works correctly, apply the configuration:

sudo netplan apply

Static IP Configuration on Desktop

Desktop users can configure networking without editing files manually.

Open:

Settings → Network

Select the active network interface and open IPv4 settings. Switch the method from Automatic (DHCP) to Manual.

Enter:

  • IP address
  • Netmask
  • Gateway
  • DNS servers

After saving the settings, reconnect the network adapter to apply the new configuration.

Common Static IP Problems on Ubuntu

Incorrect interface names are one of the most common issues. Always verify them with the ip link command.

Another frequent problem involves YAML indentation errors in Netplan files. Even a single misplaced space can prevent the network configuration from loading correctly.

If DNS stops working after the change, double-check the nameserver section and confirm the DNS addresses are properly formatted.

Conclusion

Configuring a Static IP on Ubuntu setup helps create a more stable and predictable networking environment for servers and desktop systems alike. Netplan offers a powerful way to manage networking from the command line, while Ubuntu Desktop provides an easy graphical method for less technical users.

For remote systems accessed through SSH, always test changes with netplan try before applying them permanently.

Cyber Defence

Recent Posts

Install Pip on Ubuntu 18.04: Python 3 and Python 2 Setup Guide

Pip is the official package manager for Python and the standard way to install libraries from…

1 day ago

Install R on Ubuntu 18.04 from CRAN: Statistical Computing Setup

R is an open-source programming language and environment built for statistical computing and data visualization. It…

1 day ago

Install Jenkins on Ubuntu 18.04: CI/CD Server Setup Guide

Jenkins is an open-source automation server that makes it easy to build CI/CD pipelines. Continuous integration…

1 day ago

Install Android Studio on Ubuntu 18.04 with Snap and OpenJDK 8

Android Studio is the official IDE for Android development, built on JetBrains' IntelliJ IDEA platform. It…

1 day ago

Install and Configure GitLab on Ubuntu 18.04 with Omnibus

GitLab is a web-based, open-source Git repository manager written in Ruby. It includes built-in tools for…

1 day ago

Install Anaconda on Ubuntu 18.04: Python Data Science Setup Guide

Anaconda is the most widely used Python distribution for data science and machine learning. It bundles…

2 days ago