Would you like to learn how to configure a static IP address on Ubuntu Linux? In this tutorial, we are going to show you all the steps required to configure a static IP address on a computer running Ubuntu Linux.

• Ubuntu 18.04
• Ubuntu 19.10
• Ubuntu 20.04

Ubuntu Playlist:

On this page, we offer quick access to a list of videos related to Ubuntu Linux.

Don’t forget to subscribe to our youtube channel named FKIT.

Ubuntu Related Tutorial:

On this page, we offer quick access to a list of tutorials related to Ubuntu linux.

Tutorial Ubuntu – Detect the network interface

Verify if the Ubuntu Linux detected the network interface.

Copy to Clipboard

As an example, here is our command output.

Copy to Clipboard

Take note of the network interface logical name.

Copy to Clipboard

In our example, the system detected a network interface named ENP0S3.

Tutorial Ubuntu – Configure a static IP address

Access the Netplan directory and list the configuration files available.

Copy to Clipboard

Here is the command output.

Copy to Clipboard

In our example, we found a file named: 00-INSTALLER-CONFIG.YAML

Copy to Clipboard

In our example, the system detected a network interface named ENP0S3.

Keep in mind that your file name may not be the same as ours.

Edit the network configuration file.

Copy to Clipboard

Here is the file content, before our configuration.

Copy to Clipboard

Here is the file content, after our configuration.

Copy to Clipboard

Be careful, YAML files are extremely sensitive to indentation errors.

Enable the new network configuration.

Copy to Clipboard

In our example, the network interface named ENP0S3 was configured.

This network interface was configured to use the IP address 192.168.100.100.

Tutorial Ubuntu – Verify the network configuration

Verify the network configuration using the IP command.

Copy to Clipboard

Here is the command output.

Copy to Clipboard

Or verify the network configuration using the IFCONFIG command.

Copy to Clipboard

Here is the command output.

Copy to Clipboard

Verify the routing table.

Copy to Clipboard

Here is the command output.

Copy to Clipboard

Congratulations! You configured a static IP address on the Ubuntu Linux.