TechRepublic

Account information.

how to set static ip address ubuntu 18 04

Share with Your Friends

How to configure a static IP address in Ubuntu Server 18.04

Your email has been sent

Image of Jack Wallen

From the office of, “If it’s not broken don’t fix it” comes this: In Ubuntu Server , there’s a brand new method of setting IP addresses. Gone are the days of manually editing the flat text /etc/network/interfaces file. In its place is netplan. That’s right, Ubuntu fans, the method you’ve known for years is now a thing of the past. Instead of a very simple text file, Ubuntu Server requires editing a .yaml file (complete with proper adherence to correct code indent for each line of the block), in order to configure your IP addressing.

Before you panic, it’s not all that challenging. In fact, it’s really just a matter of understanding the layout of these .yaml files and how networking is now restarted. I’m going to show you just that, such that you can configure a static IP address in Ubuntu Server 18.04 as easily as you could in 16.04.

The new method

Open up a terminal window on your Ubuntu 18.04 server (or log in via secure shell). Change into the /etc/netplan directory with the command cd /etc/netplan . Issue the command ls and you should see a file named 50-cloud-init.yaml . If you don’t also see a file named 01-netcfg.yaml , create it with the command sudo touch 01-netcfg.yaml . Before we edit that file, we need to know the name of our networking interface. Issue the command ip a and you should see your system network interface listed by name ( Figure A ).

how to set static ip address ubuntu 18 04

Now we’re going to create a new netplan configuration file. If you don’t see the 01-netcfg.yaml file, create one with the command sudo nano 01-netcfg.yaml . Our file is going to look like that which you see in Figure B .

how to set static ip address ubuntu 18 04

What’s crucial about the layout of this file is not using the exact same spacing as my example, but that you’re consistent. If you’re not consistent with your indents, the file will not work. What you see in that sample file is all you need to configure that static IP address. Do notice, you aren’t setting the address is the same fashion as you did with Ubuntu 16.04. With the old method, you set IP address and netmask like so:

address = 192.168.1.206 netmask = 255.255.255.0

With netplan, these are set with a single line:

addresses : [192.168.1.206/24]

Restarting/testing networking

With the new method, you must restart networking using netplan. So once you’ve configured your interface, issue the command:

sudo netplan apply

The above command will restart networking and apply the new configuration. You shouldn’t see any output. If networking fails to function properly, you can issue the command:

sudo netplan --debug apply

The output of the command ( Figure C ) should give you some indication as to what’s going wrong.

how to set static ip address ubuntu 18 04

That’s all there is to it

There ya go. That’s all there is to configuring a static IP address in Ubuntu Server 18.04. Remember, you’ll have to do this for each interface you have on your server. Make sure to name the files something like 01-netcfg.yaml and 02-netcfg-yaml. It’s not terribly difficult, once you’re used to not working with that old-school interfaces file.

Subscribe to the Developer Insider Newsletter

From the hottest programming languages to commentary on the Linux OS, get the developer and open source news and tips you need to know. Delivered Tuesdays and Thursdays

  • How to install Ubuntu Server 18.04
  • How to enable remote desktop connections in Ubuntu 18.04
  • How to enable an automatic purge of temp files in Ubuntu 18.04
  • How to connect Ubuntu 18.04 to your Google account
  • Ubuntu 18.04 LTS: The Linux for AI, clouds, and containers

Image of Jack Wallen

Create a TechRepublic Account

Get the web's best business technology news, tutorials, reviews, trends, and analysis—in your inbox. Let's start with the basics.

* - indicates required fields

Sign in to TechRepublic

Lost your password? Request a new password

Reset Password

Please enter your email adress. You will receive an email message with instructions on how to reset your password.

Check your email for a password reset link. If you didn't receive an email don't forgot to check your spam folder, otherwise contact support .

Welcome. Tell us a little bit about you.

This will help us provide you with customized content.

Want to receive more TechRepublic news?

You're all set.

Thanks for signing up! Keep an eye out for a confirmation email from our team. To ensure any newsletters you subscribed to hit your inbox, make sure to add [email protected] to your contacts list.

How-To Geek

How to set a static ip address in ubuntu.

When static is the way forward.

Quick Links

What is a static ip address, setting a static ip in ubuntu, set a static ip in ubuntu with the gui, connection convenience, key takeaways.

After gathering your connection name, subnet mask, and default gateway, you can set a static IP address in the terminal using the nmcli command. Or, in the GNOME desktop, open your connection settings and click the + icon, then enter the info for your static IP address there.

Your home network relies on IP addresses to route data between devices, and sometimes on reconnecting to the network a device's address can change. Here's how to give an Ubuntu Linux computer a permanent IP address that survives reboots.

Everything on your network home network, whether it's using a wired connection or Wi-Fi, has an IP address . IP stands for Internet Protocol. An IP address is a sequence of four numbers separated by three dots. Each IP address that is unique within that network.

IP addresses act as numeric labels. Your router uses these labels to send data between the correct devices. Usually, your router assigns IP addresses. It knows which IP addresses are in use and which are free. When a new device connects to the network, it requests an IP address and the router allocates one of the unused IP addresses. This is called DHCP, or dynamic host configuration protocol .

When a device is restarted or powered off and on, it may receive its old IP address once more, or it might be allocated a new IP address. This is normal for DHCP and it doesn't affect the normal running of your network. But if you have a server or some other computer that you need to be able to reach by its IP address, you'll run into problems if its IP address doesn't survive power downs or reboots.

Pinning a specific IP address to a computer is called allocating a static IP address . A static IP address, as its name suggests, isn't dynamic and it doesn't change even if the computer is power-cycled .

Nmcli is the command-line network manager tool , and can be used to change your IP address, configure network devices, and --- relevant to our purposes --- set up a static IP in Ubuntu.

We're demonstrating this technique on Ubuntu 22.04 LTS, but it ought to work on any Linux distribution, including Ubuntu 23.04. The nmcli tool was released in 2004, so it should be present on just about any standard distribution.

Let's take a look at the network connections that already exist on the computer. We're using the connection command with the show argument.

nmcli connection show

Using nmcli to list network connections

This displays some information about each connection. We only have a single connection configured.

The details of a single network connection displayed by nmcli

The output is wider than the terminal window. This is the information that we're shown.

  • Name : Our network connection is called "netplan-enp0s3."
  • UUID : The universally unique identifier Linux uses to reference this connection internally.
  • Type : This is an ethernet connection.
  • Device : This connection is using the "enp0s3" network interface. It's the only network card in this computer.

We can use the ip command to discover the IP address this computer is using.

The output of the ip addr command showing the ip address of the computer

In the output we can see the "enp0s3" entry, and its current IP address, 192.168.86.117. The "/24" is a shorthand way of saying that this network uses a 255.255.255.0 subnet mask . Take a note of this number, we'll need to use it later.

We need to choose the IP address we're going to set as our static IP address. Obviously, you can't use an IP address that is already in use by another device. One safe way to proceed is to use the current IP address assigned to the Ubuntu system. We know for certain that nothing else is using that IP address.

If we want to use a different IP address, try pinging it. We're going to test whether IP address 192.168.86.128 is in use. If everything else on your network uses DHCP and you get no response to the ping command, it should be safe to use.

ping 192.168.86.128

Using ping to determine if an IP address is in use

Even if another device had previously used that IP address, it'll be given a new IP address when it next boots up. Nothing responds to the ping requests, so we're clear to go ahead and configure 192.168.86.128 as our new static IP.

We also need to know the IP address of your default gateway , which will usually be your broadband router. We can find this using the ip command and the route option, which we can abbreviate to "r."

Using the ip command to find the IP address of the default gateway

The entry that starts with "default" is the route to the default gateway. Its IP address is 192.168.86.1. Now we can start to issue commands to set up our static IP address.

The first command is a long one.

sudo nmcli con add con-name "static-ip" ifname enp0s3 type ethernet ip4 192.168.86.128/24 gw4 192.168.86.1

Creating a new connection with the nmcli command

Taken in small chunks, it's not as bad as it looks. We're using sudo . The nmcli arguments are:

  • con : Short for "connection."
  • add : We're going to add a connection.
  • con-name "static-ip" : The name of our new connection will be "static-ip."
  • ifname enp0s3 : The connection will use network interface "enp0s3."
  • type ethernet : We're creating an ethernet connection.
  • ip4 192.168.86.128/24 : The IP address and subnet mask in classless inter-domain routing notation . This is where you need to use the number you took note of earlier.
  • gw4 192.168.86.1 : The IP address of the gateway we want this connection to use.

To make our connection a functioning connection, we need to provide a few more details. Our connection exists now, so we're not adding anything, we're modifying settings, so we use the mod argument. The setting we're changing is the IPv4 DNS settings. 8.8.8.8 is the IP address of Google's primary public DNS server , and 8.8.4.4 is Google's fallback DNS server.

Note that there is a "v" in "ipv4." In the previous command the syntax was "ip4" without a "v." The "v" needs to be used when you're modifying settings, but not when adding connections.

nmcli con mod "static-ip" ipv4.dns "8.8.8.8,8.8.4.4"

Using the nmcli command to set the DNS servers for a connection

To make our IP address static, we need to change the method which the IP address obtains its value. The default is "auto" which is the setting for DHCP. We need to set it to "manual."

nmcli con mod "static-ip" ipv4.method manual

Using the nmcli command to set an IP address to static

And now we can start or "bring up" our new connection.

nmcli con up "static-ip" ifname enp0s3

Using the nmcli command to start a network connection

We didn't get any error messages which is great. Lets use nmcli to look at our connections once more.

nmcli con show

The details of two network connections displayed by nmcli

Here's the output:

Our static-ip connection is active and using device "enp0s3." The existing connection "netplan-enp0s3" is no longer associated with a physical network interface because we've pinched "enp0s3" from it.

Click the icons at the far-right end of the system bar to show the system menu, then click on the "Wired Connected" menu option. If you're using a wireless connection, instead click the name of your Wi-Fi network.

The available connections are displayed. A dot indicates which is in use. Click the "Wired Settings" or "Wi-Fi Settings" menu option. The details of the active connection are displayed.

If you followed our previous instructions the new connection will be the active connection. We can see our new "static-ip" connection has the IP address, default gateway, and DNS servers that we set for it.

The system menu with the

To create a new connection using the "Settings" application, click the " + " icon on the "Networks" page, above the list of wired connections.

The wired connection section in the Network tab of the Settings app

A dialog appears. We need to provide a name for our new static IP connection.

Giving a name to a new connection profile in the

We're calling our new connection "static-2." Click the "IPv4" tab.

Supplying the IPv4 connection details to a new connection profile in the

Select the "Manual" radio button, and complete the "Address", "Netmask", and "Gateway" fields. Also complete the DNS field, and then click the green "Apply" button. Note the comma between the DNS entries.

Our new connection is listed in the "Wired" connections pane.

A newly-added connection in the wired connection section of the Network tab of the Settings app

You can swap between the available connections by clicking directly on their names.

If you want to modify a connection after you create it, click the cog icon. In this case, we'll enter the settings for the "static-ip" connection.

The wired connection section in the Network tab of the Settings app

A dialog box opens. Click on the "IPv4" tab.

The IPv4 tab of the connection settings dialog

Because we set our new IP address to be static, the "Manual" radio button is selected. You could change this back to DHCP by selecting the "Automatic (DHCP)" radio button, and clicking the green "Apply" button.

Using the nmcli command or the GNOME desktop and apps, you can hop between network connections very easily and very quickly.

It's more convenient to have a selection of connection profiles and move between them as you need to, rather than to have one that you keep editing. If something goes horribly wrong with the connection you're editing or adding, you can always fall back on one of the existing connections.

It's FOSS

How to Assign Static IP Address on Ubuntu Linux

Dimitrios

Brief: In this tutorial, you’ll learn how to assign static IP address on Ubuntu and other Linux distributions. Both command line and GUI methods have been discussed.

IP addresses on Linux Systems in most cases are assigned by Dynamic Host Configuration Protocol (DHCP) servers. IP addresses assigned this way are dynamic which means that the IP address might change when you restart your Ubuntu system . It’s not necessary but it may happen.

Dynamic IP is not an issue for normal desktop Linux users in most cases . It could become an issue if you have employed some special kind of networking between your computers.

For example, you can share your keyboard and mouse between Ubuntu and Raspberry Pi . The configuration uses IP addresses of both system. If the IP address changes dynamically, then your setup won’t work.

Another use case is with servers or remotely administered desktops. It is easier to set static addresses on those systems for connection stability and consistency between the users and applications.

In this tutorial, I’ll show you how to set up static IP address on Ubuntu based Linux distributions. Let me show you the command line way first and then I’ll show the graphical way of doing it on desktop.

Method 1: Assign static IP in Ubuntu using command line

Static IP set up Ubuntu

Note for desktop users : Use static IP only when you need it. Automatic IP saves you a lot of headache in handling network configuration.

Step 1: Get the name of network interface and the default gateway

The first thing you need to know is the name of the network interface for which you have to set up the static IP.

You can either use ip command or the network manager CLI like this:

In my case, it shows my Ethernet (wired) network is called enp0s25:

Next, you should note the default gateway IP using the Linux command ip route :

As you can guess, the default gateway is 192.168.31.1 for me.

Step 2: Locate Netplan configuration

Ubuntu 18.04 LTS and later versions use Netplan for managing the network configuration. Netplan configuration are driven by .yaml files located in /etc/netplan directory.

By default, you should see a .yaml file named something like 01-network-manager-all.yaml, 50-cloud-init.yaml, 01-netcfg.yaml.

Whatever maybe the name, its content should look like this:

You need to edit this file for using static IP.

Step 3: Edit Netplan configuration for assigning static IP

Just for the sake of it, make a backup of your yaml file.

Please make sure to use the correct yaml file name in the commands from here onward.

Use nano editor with sudo to open the yaml file like this:

Please note that yaml files use spaces for indentation . If you use tab or incorrect indention, your changes won’t be saved.

You should edit the file and make it look like this by providing the actual details of your IP address, gateway, interface name etc.

In the above file, I have set the static IP to 192.168.31.16.

Save the file and apply the changes with this command:

You can verify it by displaying your ip address in the terminal with ‘ip a’ command.

If you don’t want to use the static IP address anymore, you can revert easily.

If you have backed up the original yaml file, you can delete the new one and use the backup one.

Otherwise, you can change the yaml file again and make it look like this:

Method 2: Switch to static IP address in Ubuntu graphically

If you are on desktop, using the graphical method is easier and faster.

Go to the settings and look for network settings. Click the gear symbol adjacent to your network connection.

Assign Static IP address in Ubuntu Linux

Next, you should go to the IPv4 tab. Under the IPv4 Method section, click on Manual.

In the Addresses section, enter the IP static IP address you want, netmask is usually 24 and you already know your gateway IP with the ip route command.

You may also change the DNS server if you want. You can keep Routes section to Automatic.

Assigning static IP in Ubuntu Linux

Once everything is done, click on Apply button. See, how easy it is to set a static IP address graphically.

If you haven’t read my previous article on how to change MAC Address , you may want to read in conjunction with this one.

More networking related articles will be rolling out, let me know your thoughts at the comments below and stay connected to our social media.

Dimitrios is an MSc Mechanical Engineer but a Linux enthusiast in heart. His machines are powered by Arch Linux but curiosity drives him to constantly test other distros. Challenge is part of his per

Meet DebianDog - Puppy sized Debian Linux

Reduce computer eye strain with this nifty tool in linux, install open source dj software mixxx version 2.0 in ubuntu, install adobe lightroom alternative rawtherapee in ubuntu linux, complete guide to installing linux on chromebook, become a better linux user.

With the FOSS Weekly Newsletter, you learn useful Linux tips, discover applications, explore new distros and stay updated with the latest from Linux world

It's FOSS

Great! You’ve successfully signed up.

Welcome back! You've successfully signed in.

You've successfully subscribed to It's FOSS.

Your link has expired.

Success! Check your email for magic link to sign-in.

Success! Your billing info has been updated.

Your billing was not updated.

Setting a Static IP in Ubuntu – Linux IP Address Tutorial

In most network configurations, the router DHCP server assigns the IP address dynamically by default. If you want to ensure that your system IP stays the same every time, you can force it to use a static IP.

That's what we will learn in this article. We will explore two ways to set a static IP in Ubuntu.

Static IP addresses find their use in the following situations:

  • Configuring port forwarding.
  • Configuring your system as a server such as an FTP server, web server, or a media server.

Pre-requisites:

To follow this tutorial you will need the following:

  • Ubuntu installation, preferably with a GUI.
  • sudo rights as we will be modifying system configuration files.

How to Set a Static IP Using the Command Line

In this section, we will explore all the steps in detail needed to configure a static IP.

Step 1: Launch the terminal

You can launch the terminal using the shortcut Ctrl+ Shift+t .

Step 2: Note information about the current network

We will need our current network details such as the current assigned IP, subnet mask, and the network adapter name so that we can apply the necessary changes in the configurations.

Use the command below to find details of the available adapters and the respective IP information.

The output will look something like this:

image-14

For my network, the current adapter is eth0 . It could be different for your system

  • Note the current network adapter name

As my current adapter is eth0 , the below details are relevant.

It is worth noting that the current IP 172.23.199.129 is dynamically assigned. It has 20 bits reserved for the netmask. The broadcast address is 172.23.207.255 .

  • Note the subnet

We can find the subnet mask details using the command below:

Select the output against your adapter and read it carefully.

image-15

Based on the class and subnet mask, the usable host IP range for my network is: 172.23.192.1 - 172.23.207.254 .

Subnetting is a vast topic. For more info on subnetting and your usable IP ranges, check out this article .

Step 3: Make configuration changes

Netplan is the default network management tool for the latest Ubuntu versions. Configuration files for Netplan are written using YAML and end with the extension .yaml .

Note: Be careful about spaces in the configuration file as they are part of the syntax. Without proper indentation, the file won't be read properly.

  • Go to the netplan directory located at /etc/netplan .

ls into the /etc/netplan directory.

If you do not see any files, you can create one. The name could be anything, but by convention, it should start with a number like 01- and end with .yaml . The number sets the priority if you have more than one configuration file.

I'll create a file named 01-network-manager-all.yaml .

Let's add these lines to the file. We'll build the file step by step.

The top-level node in a Netplan configuration file is a network: mapping that contains version: 2 (means that it is using network definition version 2).

Next, we'll add a renderer, that controls the overall network. The renderer is systemd-networkd by default, but we'll set it to NetworkManager .

Now, our file looks like this:

Next, we'll add ethernets and refer to the network adapter name we looked for earlier in step#2. Other device types supported are modems: , wifis: , or bridges: .

As we are setting a static IP and we do not want to dynamically assign an IP to this network adapter, we'll set dhcp4 to no .

Now we'll specify the specific static IP we noted in step #2 depending on our subnet and the usable IP range. It was 172.23.207.254 .

Next, we'll specify the gateway, which is the router or network device that assigns the IP addresses. Mine is on 192.168.1.1 .

Next, we'll define nameservers . This is where you define a DNS server or a second DNS server. Here the first value is   8.8.8.8 which is Google's primary DNS server and the second value is 8.8.8.4 which is Google's secondary DNS server. These values can vary depending on your requirements.

Step 4: Apply and test the changes

We can test the changes first before permanently applying them using this command:

If there are no errors, it will ask if you want to apply these settings.

Now, finally, test the changes with the command ip a and you'll see that the static IP has been applied.

image-17

How to Set a Static IP Using the GUI

It is very easy to set a static IP through the Ubuntu GUI/ Desktop. Here are the steps:

  • Search for settings .
  • Click on either Network or Wi-Fi tab, depending on the interface you would like to modify.
  • To open the interface settings, click on the gear icon next to the interface name.
  • Select “Manual” in the IPV4 tab and enter your static IP address, Netmask and Gateway.
  • Click on the Apply button.

image-16

  • Verify by using the command ip a

image-18

In this article, we covered two methods to set the static IP in Ubuntu. I hope you found the article useful.

What’s your favorite thing you learned from this tutorial? Let me know on Twitter !

You can read my other posts here .

I am a DevOps Consultant and writer at FreeCodeCamp. I aim to provide easy and to-the-point content for Techies!

If you read this far, thank the author to show them you care. Say Thanks

Learn to code for free. freeCodeCamp's open source curriculum has helped more than 40,000 people get jobs as developers. Get started

  • Trending Categories

Data Structure

  • Selected Reading
  • UPSC IAS Exams Notes
  • Developer's Best Practices
  • Questions and Answers
  • Effective Resume Writing
  • HR Interview Questions
  • Computer Glossary

How to Configure Network Static IP Address in Ubuntu 18.04?

Introduction.

The Internet Protocol (IP) address is a crucial component of computer networking as it uniquely identifies each device connected to a network. By default, most network interfaces are configured to obtain an IP address dynamically from a router or DHCP server. However, in some cases, it is necessary to configure a static IP address.

A static IP address is an IP address that is manually assigned to a device and does not change over time unless manually reconfigured. In this article, we will discuss how to configure a static IP address on Ubuntu 18.04 and why it's important in some situations.

What Is Static IP Address And Why It's Important?

When you connect your computer or other devices like printers and servers to a network, they are assigned dynamic IPs by default using DHCP (Dynamic Host Configuration Protocol). However, there are several reasons why you may want or need your devices to have static IPs instead of dynamic IPs.

One of the primary reasons for having a static IP is stability- when you have a device with dynamic IPs constantly changing its addresses it can be challenging for other computers on the network to keep track of where that machine is located correctly. This problem can cause issues such as disrupted connections and broken services.

With a static IP address, you specify an address that devices will always be able to find your machine at no matter what else changes on the network around it over time. Another reason for having a static IP is security – assigning fixed addresses can help security measures track traffic patterns from known locations more efficiently than if addresses constantly change; this helps them distinguish between legitimate traffic from known hosts versus potentially malicious traffic from unknown sources.

Understanding Network Configuration in Ubuntu 18.04

Overview of network configuration files and their locations.

Before proceeding with setting up a static IP address, it is important to have a basic understanding of network configuration files in Ubuntu 18.04. There are two primary configuration files for network settings in Ubuntu 18.04: /etc/network/interfaces and /etc/netplan/*.yaml.

The /etc/network/interfaces file is used by the ifupdown package, which is the traditional method of configuring networking on Ubuntu systems. The file contains interface configurations such as IP address, netmask, gateway, and DNS servers.

The /etc/netplan/*.yaml file is used by the Netplan utility for configuring networking in Ubuntu 18.04. This YAML-based configuration file provides a simple and flexible way to configure network interfaces.

Explanation of the importance of understanding network configuration before proceeding with configuring a static IP address

Having an understanding of how network configurations work in Ubuntu 18.04 is essential when configuring static IP addresses. Static IP addresses are manually assigned, unlike dynamic IPs that are automatically assigned by DHCP (Dynamic Host Configuration Protocol). Assigning an incorrect static IP address or modifying other critical settings can lead to loss of connectivity to the network and internet.

Therefore, before proceeding with setting up a static IP address on your system, it is important to have some knowledge about how networking works in Ubuntu 18.04 operating system so that you can avoid making mistakes that might cause problems later on during the process or cause your system to be inaccessible over your local area network or even over public networks like the internet. In short, having this knowledge will help you troubleshoot any problem or issue that may arise during the process correctly because you will understand what is happening and why.

Identifying Network Interface Name and Current IP Address

As we proceed towards configuring a static IP address in Ubuntu 18.04, the first step is to identify the network interface name. In Ubuntu 18.04, network interfaces are named differently from previous versions, so it is important to understand how to find the correct interface name.

One way to identify the name of the network interface is by using command-line tools such as ifconfig or ip addr show. To use ifconfig, open a terminal window and type "ifconfig" at the prompt.

A list of all available network interfaces will be displayed with their respective names. To check the current dynamic IP address assigned to the interface, look for an entry labeled "inet addr" under each interface’s details in ifconfig output.

The inet addr value represents the dynamic IP address assigned by DHCP server. Another tool that can be used to obtain information about network interfaces in Ubuntu 18.04 is ip command line utility.

By running “ip addr show” command on terminal you can get a detailed list of all available interfaces with their IPv4, IPv6 addresses and other important information. Knowing how to find both this information will be useful while configuring static IP addresses in Ubuntu 18.04 since you need this information while editing netplan YAML file in order configure a static IP address correctly

Configuring Static IP Address using Netplan

Overview of netplan yaml file structure.

Netplan is a configuration utility that allows users to easily configure network settings in Ubuntu 18.04. The main configuration file for Netplan is located at "/etc/netplan/", and it uses YAML syntax for its configuration files. The syntax of the file is strict, so even a small error can cause issues with network connectivity.

The top-level elements in the Netplan YAML file specify the behavior of each network interface defined in the configuration file. These elements contain basic information about the network interface, such as its name, IP address, gateway, DNS server(s), and any custom routes.

Step-by-step guide on how to edit and configure Netplan YAML file for static IP addressing.

Here are the steps involved in configuring a static IP address using Netplan −

Open your Terminal application by pressing `Ctrl+Alt+T` or searching for "Terminal" on the Ubuntu applications menu.

Navigate to "/etc/netplan/" by running this command: `cd /etc/netplan/`

Open the default NetPlan YAML configuration file called "50-cloud-init.yaml" by running this command: `sudo nano 50-cloud-init.yaml`

Locate your network interface name from Section II earlier (e.g., enp0s25) and add these lines under it−

Replace "YOUR_STATIC_IP_ADDRESS/MASK", "YOUR_GATEWAY_IP_ADDRESS", and "YOUR_DNS_SERVER_IP_ADDRESSES" with your own values.

Save your changes by pressing `Ctrl+X`, then press Y when prompted to save, and press Enter to confirm the file name.

Test your configuration by running the following command: `sudo netplan apply`

Explanation on how to apply changes made on Netplan YAML file.

To apply changes made in the Netplan YAML file, you need to run the "netplan apply" command in the Terminal. This command applies your changes immediately without requiring a system reboot.

If you don't run this command, any changes you make will not be applied until a system reboot or until you manually run this command. Additionally, if there are any syntax errors in your NetPlan YAML configuration file, running "netplan apply" will fail and an error message will be displayed in your Terminal output.

Overall, configuring static IP addresses using NetPlan can be a great way to ensure stable network connectivity for Ubuntu 18.04 users. The process may seem complex at first glance but once you follow these steps carefully it'll become much simpler.

In this article, we discussed the importance of having a static IP address in Ubuntu 18.04. A static IP address ensures that your device can always be reached at the same network address, making it easier to manage and keep track of devices on your network. This is particularly important for servers and other devices that need to be accessible from outside your local network.

Satish Kumar

Related Articles

  • How to Configure Network Static IP Address on RHEL/CentOS 8?
  • How to Install and Configure an NFS Server on Ubuntu 18.04?
  • Difference between Static IP Address and Dynamic IP Address
  • How to Change Hostname on Ubuntu 18.04?
  • 3 Ways to Set a Static IP Address in RHEL 8
  • How to Install Anaconda on Ubuntu 18.04 and 20.04?
  • How to Enable/Disable UFW Firewall on Ubuntu 18.04 & 20.04?
  • How to hide an IP address
  • How to identify server IP address in PHP?
  • How to get the ip address in C#?
  • How to Install and Configure FTP Server in Ubuntu?
  • How to Pad IP Address With Zero in Excel?
  • Validate IP Address in Python
  • Validate IP Address in C#
  • Validate IP Address in C++

Kickstart Your Career

Get certified by completing the course

how to set static ip address ubuntu 18 04

  • Knowledge Base
  • Customer Login

Dedicated Servers

Robust, secure and industrial-grade dedicated servers.

Storage Dedicated Servers

Affordable, customizable, reliable

High Performance Servers

High availability hosting utilizing high grade servers.

Secure, single-tenant and agile virtualized environment.

Co-location

Safe home for your servers in our high-class data centre.

Backup and Restore

Reliable, cost effective, backup and disaster recovery.

DDos Protection

7 layer DDoS mitigation system that protects your network.

Managed Services

Outsource your IT tasks to our skilled technical team.

Find a good domain for your business.

Powerful email hosting platform at your fingertips.

Web Hosting

Reliable and scalable web hosting solution.

It’s not about what we say, it’s about what we do. Learn more about Casbay’s background and confidently join our growing community.

Our vision, history and photo gallery.

Our Data Centre

Tier III certified data centre.

Our Clients

Explore our existing client base.

Our partners that grow with us in our journey.

The latest news and media releases.

Casbay Knowledge Base

Search our articles or browse by category below.

how to set static ip address ubuntu 18 04

How to Configure Static IP Address on Ubuntu 18.04

In this tutorial, we’ll explain how to set up a static IP address on Ubuntu 18.04.

Do you know that:

Your router DHCP server would assign the IP addresses dynamically? In different situations such as configuring port forwarding or running a media server on your network, it may be necessary to set a static IP address on your Ubuntu computer.

Configuring Static IP address using DHCP

The easiest way to assign a static IP address to a device on your LAN is by setting up a Static DHCP on your router. Static DHCP or DHCP reservation is a feature that we find on most routers which makes the DHCP server automatically assign the same IP address to a specific network device, every time the device requests an address from the DHCP server. This works by assigning a static IP to the device’s unique MAC address. However, the steps for configuring a DHCP reservation vary from router to router and it’s advisable to consult the vendor’s documentation.

Starting with the 17.10 release, Netplan is the default network management tool on Ubuntu, replacing the configuration file /etc/network/interfaces that had previously been used to configure the network on Ubuntu.

Netplan uses configuration files with YAML syntax. To configure a network interface with Netplan you simply create a YAML description for that interface and Netplan generates the required configuration files for the renderer tool that you choose.

Moreover, Netplan currently supports two renderers NetworkManager and Systemd-networkd. We use NetworkManager mostly on desktop machines. For System-network, we use it when a GUI is absent on servers.

Configuring Static IP address on Ubuntu Server

To configure a static IP address, you will need a VPS or Dedicated Server that runs on Ubuntu. The newer versions of Ubuntu uses ‘Predictable Network Interface Names’ that start with en[letter][number] . by default. The first step is to identify the name of the ethernet interface you want to configure. You can use the following IP link command:

The command will print a list of all the available network interfaces. In this case, the name of the interface is  ens3 :

The location of the Netplan configuration files is in the /etc/netplan  directory and have the extension  .yaml . You’ll probably find one or two YAML files in this directory. The file may differ from setup to setup. Usually, the file is named either  01-netcfg.yaml ,  50-cloud-init.yaml  or  NN_interfaceName.yaml , but in your system, it may be different.

Next, open the YAML configuration file with your text editor:

Before changing the configuration

Let’s explain the code in a short time before changing the configuration.

Each Netplan Yaml file starts with the network  key that has at least two required elements. The first required element is the version of network configuration format and the second one is the device type. Device types values can be  ethernets ,  bonds ,  bridges , and  vlans .

Furthermore, the configuration above also includes the renderer  type. Out of the box, if you installed Ubuntu in server mode the renderer is configured to use  networkd  as the back end.

Under the device’s type ( in this case  ethernets ) we can specify one or more network interfaces. In this example, we have only one interface ens3  that is configured to obtain IP addressing from a DHCP server  dhcp4: yes .

To assign a static IP address to  ens3 the interface edit the file as follows:

  • Set DHCP to no  dhcp4: yes
  • Specify the static IP address  192.168.121.199/24 . Under  addresses:  you can add one or more IPv4 or IPv6 IP addresses that will be assigned to the network interface.
  • Specify the gateway  gateway4: 192.168.121.1
  • Under  nameservers , specify the nameservers  addresses: [8.8.8.8, 1.1.1.1]

Make  sure  you  follow  the  YAML  code  indent  requirements  when  editing  Yaml  files  as  it  may not  work if  the c onfiguration  includes  a  syntax  error.

Once you save and closed the  file, and  the  changes  are  applied  with:

Then verify the changes by typing:

That’s it! You have assigned a static IP to your Ubuntu server.

Configuring Static IP address on Ubuntu Desktop

Setting up a static IP address on Ubuntu Desktop computers requires no technical knowledge.

1.In the Activities screen, search for “network” and click on the Network icon. This will open the GNOME Network configuration settings. Click on the cog icon.

how to set static ip address ubuntu 18 04

3. In “IPV4” Method” section select “Manual”, and enter your static IP address, Netmask and Gateway.  Click  on  the  “Apply”  button  once  completed.

how to set static ip address ubuntu 18 04

Now that you have set up a static IP Address, open your terminal either by using the  Ctrl+Alt+T  keyboard shortcut or by clicking on the terminal icon and verify the changes by typing:

The output will show the interface IP address:

You have learned how to assign a static IP address on your Ubuntu 18.04 machine.

If you have any questions, please leave a comment below.

Looking for more guide articles on Ubuntu? Kindly visit our Knowledge Base .

how to set static ip address ubuntu 18 04

  • [email protected]
  • Cloud Server
  • VPS Hosting
  • Windows VPS
  • Dedicated Server
  • Cloud calculator
  • Encryption Project
  • Data Center
  • Terms of Service
  • Acceptance Use Policy
  • Privacy Policy
  • Money Back Guarantee
  • Payment Info
  • Support Ticket
  • Knowledgebase

how to set static ip address ubuntu 18 04

Copyright © 2010 – 2023  Casbay LLC. All Rights Reserved.

Tecmint: Linux Howtos, Tutorials & Guides

How to Set Static IP Address and Configure Network in Linux

If you are a Linux system administrator, time will come when you will need to configure networking on your system. Unlike desktop machines where you can use dynamic IP addresses, on a server infrastructure, you will need to setup a static IP address (at least in most cases).

Read Also: How to Set or Change System Hostname in Linux </p

This article is meant to show you how to configure static IP address on most frequently used Linux distributions.

For the purpose of this tutorial, we will use the following Internet Protocol version 4 (IPv4) details:

Configure Static IP Address in RHEL/CentOS/Fedora:

To configure static IP address in  RHEL / CentOS / Fedora , you will need to edit:

Where in the above "ifcfg-eth0" answers to your network interface eth0 . If your interface is named “ eth1" then the file that you will need to edit is "ifcfg-eth1" .

Let’s start with the first file:

Open that file and set:

Note : Make sure to open the file corresponding to your network interface. You can find your network interface name with ifconfig -a command .

In that file make the following changes:

You will only need to edit the settings for:

  • DNS1 and DNS2

Other settings should have already been predefined.

Next edit resolve.conf file by opening it with a text editor such as nano or vi :

Once you have made your changes restart the networking with:

Set Static IP Address in Debian / Ubuntu

To setup static IP address in Debian / Ubuntu , open the following file:

You may see a line looking like this:

Change it so it looks like this:

Save the file and then edit /etc/resolv.conf like this:

Restart the networking on your system with:

Your static IP address has been configured.

Conclusion:

You now know how to configure a static IP address on a Linux distro. If you have any questions or comments, please do not hesitate to submit them in the comment section below.

Previous article:

Next article:

Photo of author

Each tutorial at TecMint is created by a team of experienced Linux system administrators so that it meets our high-quality standards.

Related Posts

Install RPM Packages in Linux

20 Practical Examples of RPM Commands in Linux

Fix “bash: curl: command not found”

How to Fix “bash: curl: command not found” Error

Advance Commands for Linux Admin

Level Up Linux: 20 Advanced Commands for Mid-Level Users

Extract Linux Tar Files Different or New Directory

How to Extract Tar Files to Specific or Different Directory in Linux

Debian Goodies Utilities to Manage Debian Packakges

8 Useful ‘Debian Goodies Utilities’ for Package Management

Delete User Accounts with Home Directory in Linux

How to Delete User Accounts and Their Home Directories in Linux

32 thoughts on “How to Set Static IP Address and Configure Network in Linux”

The time will come when you will need to configure networking on your system. Unlike desktop machines where you can use dynamic IP addresses, on a server infrastructure, you will need to set up a static IP address (at least in most cases).

Terrible – and my ‘ linux distro ‘ isn’t the same as yours, there’s no ‘ /etc/sysconfig/ ‘ folder.

In Ubuntu 20.04 there is no interfaces file they switch to netplan . If you can update this article to include the new change it will help a lot.

thanks Raouf

Well, this isn’t correct. Just trashed my Linux mint distro

Is it public Static IP? or can I use to access data from other networks?

Failed to restart network.service: Unit network.service not found.

I’m asking a question on a fairly old thread, but just in case, is it possible to do this on a WIFI network?

For example, when using the first command (# nano /etc/network/interfaces ) in Ubuntu, the result I see is:

There isn’t an “ eth0 ” on my server because it is connected by WIFI only. Will it still work using another option?

Yes it will work I think so, just change the settings in the interfaces file as explained in this article.

I set the static IP in ifcfg-eth0, added HWADDR and UUID, but on reboot system does not associate the IP to eth0.

This is VM. Any idea why its happening and steps to troubleshoot.

I think you need to make sure that you select “ manual ” and the correct IP address, subnet mask, and gateway and save the configuration as explained in the article. Also, I personally would select a new and different IP address, so that you can really check if it has been saved by opening the terminal and typing:

after a restart.

If i set ip address as static am not able to ping google.com why and also packages are not installed.

Please give me reply as soon as possible.

@Rajeshkar,

Please add the DNS Name servers in your /etc/resolv.conf file..

@Ravi Saive thanks for your reply , yes i did /etc.resolv.conf also but getting the same problem

@Rajesekar,

The file is /etc/resolv.conf , in this file add your DNS name servers for example.

When I enter the /etc/resolv.conf file, what is it supposed to look like? And when you say “edit” do you mean delete what’s there and write what you’ve provided, or just add new lines?

Hello Marin, Thank you very much for this article. It was a major help in my class project. This is my first time using a vm and it is an awesome learning experience. I’m really glad I ran into this article, it was well written and easy to follow.

Just wanted to say a million thank you’s for this well-written, comprehensive and easily-understood article! Awesome stuff! A real lifesaver too, as I had to quickly configure a static IP for myself to get access to remote computing. Thank you! :-D

A question from a linux newbie. Does this instruction apply for both ubuntu running on my desktop PC as well as debian linux on an embedded board?

Yes, the instructions will works on any Debian/Ubuntu based distribution without any issues..have you tried on your embedded board? does these instructions worked? let us know.

Hi Ravi, thanks for your reply.

Default the folder /etc/sysconfig does not exist on my embedded system. Of Course i could create it as well as the files mentioned, but it would be out of the context of this instructions.

Thanks, Rob

I found here very good stuff! You are doing an excellent job and I like your site! Thanks!

Thanks for finding this site very useful and thanks for appreciating our work, Keep visiting for more such useful articles…

Great job, I was I actually looking for an article like this one. So thank you so very much. Keep up the good work.

Thanks for appreciating and finding this article useful, keep connected to Tecmint for such wonderful articles…:)

What if I have 2 NICs on my server one for LAN & one for WAN and I want to set one of them (WAN) as default gateway? How to configure this server as gateway and as a router.

The easiest way to add default gateway using route command as shown:

Don’t forget to replace the gateway IP address and interface-name in the above command.

One can also use following command to setup static IP on eth0 interface for example. # ifconfig eth0 192.168.1.1 netmask 255.255.255.0 up # route add default gw 192.168.0.1 # service network restart

Thanks for the tip, but I think setting IP address directly from the commandline using ifconfig and route will only allow you to set temporarily, once you reboot, these settings disappears. So, the best option to set static IP address permanently in network configuration files only….

wipe on reboot, so that best option is to set permannetly

Hello Ravi, What is difference between the service “NetworkManager” and “network”

@Augustine,

This article will help you to understand the difference between and NetworkManager and Network: http://askubuntu.com/questions/1786/what-is-the-difference-between-network-manager-and-ifconfig-ifup-etc

Why do we need to specify DNS in both ifcfg-eth0 and resolvlf.conf?

Hello Augustine,

Actually if you have added the DNS servers in the ifcfig-eth0 file the DNS servers will be automatically added to /etc/resolv.conf. You can skip defining the DNS servers in the ifcfig-eth0 file, but then you will need to have them set in /etc/resolv.conf manually. It’s a good practice to make sure that the DNS servers are specified correctly in both files, this is why the article says to set them in both files.

Got something to say? Join the discussion. Cancel reply

Thank you for taking the time to share your thoughts with us. We appreciate your decision to leave a comment and value your contribution to the discussion. It's important to note that we moderate all comments in accordance with our comment policy to ensure a respectful and constructive conversation.

Rest assured that your email address will remain private and will not be published or shared with anyone. We prioritize the privacy and security of our users.

Save my name, email, and website in this browser for the next time I comment.

How to Set Static IP Address on Ubuntu Server 22.04

In this post, we will cover how to set static ip address on Ubuntu server 22.04.

It is highly recommended to have a static ip on linux server because it would be persistent across the reboot. Static IP plays an important role for servers like Mail Server, Web Server and File server etc.

Prerequisites

  • Minimal Installed Ubuntu Server 22.04
  • Regular User with sudo admin rights

In Ubuntu server 22.04, networking is controlled by netplan utility , so we will use netplan to configure static ip address on Ubuntu server.

Note: we cannot use nmcli utiltity as it is not the part of default installation on Ubuntu server.

Setting up Static IP address on Ubuntu Server 22.04

Login to your Ubuntu server 22.04, look for the netplan configuration file. It is located under /etc/netplan directory.

Run below cat command to view the contents of ‘00-installer-config.yaml’

Note: Name of configuration file may differ as your per setup. As it is an yaml file, so make sure to maintain the indentation and syntax while editing.

Default-Content-netplan-ubuntu-server

As per above output, it says that we have ens33 interface and it is getting ip from dhcp server. Alternate way to view interface name is via ip command.

Now, to configure static ip in place of dhcp, edit netplan configuration file using vi or nano editor and add the following content.

save and close the file.

Updated-Netplan-Config-File-Content-Ubuntu-Server

In the above file we have used following,

  • ens33 is the interface name
  • addresses are used to set the static ip
  • nameservers used to specify the DNS server ips
  • routes used to specify the default gateway

Note: Change the IP details and interface name as per your environment.

To make above changes into the effect the apply these changes using following netplan command,

Run following ip command to view the ip address on interface,

To view the default route, run

Output of above commands,

ip-addr-route-command-output-ubuntu-server

Perfect, above commands’ output confirms that static ip and route has been configured successfully.

That’s all from this post. Kindly do post your queries and feedback in below comments section.

11 thoughts on “How to Set Static IP Address on Ubuntu Server 22.04”

How do I use Netplan to set up a static IP address on WIFI?

change the network device “ens33” to something else, it will be listed when you run “ip a”; it;s probably wlan0 but that’s not guaranteed.

there will be a config file for the wifi interface. look for something like 00-installer-config-wifi.yaml

Hey! thanks I had problems before setting up the DNS and none config would work! This one did and you made this post really simple to follow!

Your text for configuring a static IP address does not work in my Ubuntu 20.04.5 server’s NIC. No matter how I space or tab the indentations, I get “Ivalid YAML: inconsistent indentation: addresses:

I’ve been at the problem for a couple of weeks, with no fix in site; no spacing or tabbing change I make fixes it. Can anyone please advise me? Thanks.

try paste the YAML into here ‘https://www.yamllint.com/’

Copy paste not work here, you should try typing instead or if you paste, try to delete all the space before each line and tab key until the same format

The spacing must be done with the space key. If you try to make spaces in a yaml file with the tab key it will not work. Also you should let yamllint.com correct the file for you

Your article is quite nice and clear! but after followed, following error occurred when ping google.com: “temporary failure in name resolution”, meanwhile localhost can be visited. Is anyone facing this issue as well? I’ll quite appreciate it if can get some advise.

can we use default DHCP ip configuration along with another static ip in ubuntu 22.04 ? i already have ens33 then i added eth0 as static ip , netplan apply did not thrown any errors but unable to see my static ip , when i do ifconfig 🙁 even after reboot its not applying, any suggestions..

i successfully set up my static ip but I cant ping to 192.168.1.1 why

Leave a Comment Cancel reply

Stack Exchange Network

Stack Exchange network consists of 183 Q&A communities including Stack Overflow , the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

How do I set a static IP in Ubuntu 20.04.3 LTS?

I'm trying to set up a lab computer as a ssh server following this guide . One of the steps is setting up a static IP address. So, I was glad to find this answer . Following it, I created /etc/netplan/50-cloud-init.yaml file, pasted

where my_ethernet_num == enp9s0 . Buuuut, after this ip a showed no ip address for the Ethernet:

and sudo lshw -C network yielded *-network DISABLED . Then I tried to use that guide (section 'Static IP Address Assignment'). I created /etc/netplan/99_config.yaml , pasted the necessary code, run sudo netplan apply . Nothing changed except that I STOPPED SEEING wired connections in network settings... I tried the answer from here , and the 'Wired' section returned. But I can't change anything (for example, I can't pick 'Manual' option).

Screenshot

So, the questions are: how can I return the ability of changing it (in order to follow one more guide ), or is there any other solution that will succeed in setting static ip address?...

--EDIT from 12/05/2021--

Here are all of my .yaml files showed by ls -al /etc/netplan :

01-network-manager-all.yaml:

50-cloud-init.yaml:

99_config.yaml:

  • network-manager

Serg's user avatar

  • 1 Probably you should delete/revert all changes that you have made, to get back to the original configuration. Then just use "Manual" option from the GUI. No need to mess with configuration files manually. –  raj Nov 29, 2021 at 12:44
  • @raj, thank you for your comment! If I only knew how to revert all the changes... By the way, after rebooting, I suddenly found out that I can make changes to the settings! So, I'll try the the GUI option and write about results :) –  TopCoder2000 Nov 29, 2021 at 13:31
  • Why does your .yaml use enp0s3, when your interface is enp9s0? Are you using a Server or Desktop installation? –  heynnema Nov 29, 2021 at 23:37
  • @heynnema, because it was in the answer for 'How do I set a static IP in Ubuntu?' . As we can see, enp0s25 is used in the question, but then enp0s3 is used in the answer, so I thought that it always must be enp0s25. > Are you using a Server or Desktop installation? I would like to use a Desktop installation, but I don't know concretely which one I was using... Is there any difference? I tried to follow Desktop installation but I could get confused. –  TopCoder2000 Dec 1, 2021 at 19:31
  • @TopCoder2000 Your network can't possibly be working with enp0s3 in the .yaml file. It needs to be enp9s0. But if you're using a Desktop installation, then your .yaml is all wrong anyway. A Desktop installation has a GUI, a Server installation is CLI only. Also, your self-accepted answer doesn't really make a lot of sense. –  heynnema Dec 1, 2021 at 19:37

Pick ONE of the following two configurations...

Server installation with static IP...

Delete /etc/netplan/01-network-manager-all.yaml

Delete /etc/netplan/50-cloud-init.yaml

Edit /etc/netplan/99_config.yaml to look EXACTLY like this...

Note : regarding 192.168.0.116, make sure this address is outside of the DHCP range set in your router, and is not already used elsewhere.

Note : For DNS nameservers, settle on servers from one source... Google, Cloudflare, OpenDNS, etc. (3 max).

sudo netplan generate

sudo netplan apply

Desktop installation with static IP...

Delete /etc/netplan/99_config.yaml

Edit /etc/netplan/01-network-manager-all.yaml to look EXACTLY like this...

Note : Use the NetworkManager GUI to setup your static IP for "Wired Connection".

Note : See https://netplan.io/examples/ for examples and design info about netplan.

heynnema's user avatar

  • Thank you for your answer and netplan examples! Now ip a shows correct output. But how do I setup a static IP with NetworkManager GUI? –  TopCoder2000 Dec 6, 2021 at 18:28
  • @TopCoder2000 Firstly, you can't use both parts of my answer at the same time. It's part 1 or part 2. If you're using part 2, then my answer says "Use the NetworkManager GUI to setup your static IP for "Wired Connection"" . See the IPv4 tab. Click on the manual button. Fill in the address, mask, gateway, and DNS servers, and turn off DNS Auto. –  heynnema Dec 6, 2021 at 18:44
  • yes, I remember! I'll accept it as soon as I don't have any questions :) Yes, I'm using the second option. But you also wrote yesterday that 'Static IPs should be set to be outside of the DHCP range set in the router'. But how do I know that set? For example, the second answer from here says that we have to check DHCP server configuration... –  TopCoder2000 Dec 7, 2021 at 6:51
  • @TopCoder2000 You must log into the admin page of your router and find the DHCP server settings. For your computer's static IP, you'll need to pick an address outside of the DHCP server's range of addresses. –  heynnema Dec 7, 2021 at 15:01
  • Ah, good! Thanks! –  TopCoder2000 Dec 9, 2021 at 7:07

You must log in to answer this question.

Not the answer you're looking for browse other questions tagged networking 20.04 network-manager ethernet ..

  • The Overflow Blog
  • Chunking express: An expert breaks down how to build your RAG system
  • Building GenAI features in practice with Intuit Mailchimp
  • Featured on Meta
  • Our partnership with Google and commitment to socially responsible AI
  • Shifting the data dump schedule: A proposal
  • AI-generated content is not permitted on Ask Ubuntu
  • Goodbye Gunnar Hjalmarsson 1958.10.06 - 2023.12.20

Hot Network Questions

  • What is the mountain lake in this photo?
  • Is there any ban that prevents the militarization of the moon?
  • How could a light sorcerer fly
  • Are there actually any photons in orbit in the photon sphere of a black hole?
  • What are average comparisons in the `marginaleffects` package?
  • Frequentist probability: Can we prove mathematically what we are setting probabilities equal to, or are they just assumptions/definitions?
  • Example of NOT-falsifiable
  • Is there a non-zero function from R^2 to R which sums to 0 on the corners of any unit square?
  • Is knowledge non-physical?
  • "To run a picture". Does it mean "publish"?
  • Deformation Invariance for Tensor Powers of the Cotangent Bundle
  • How easily could a pre-scientific people purify a substance and hence grow a pure crystal?
  • Great battles in the history of mathematics
  • Ideals generated by Turing independent sets
  • Is it correct to say 'две штуки' or 'два штуки' when talking about something masculine?
  • If beef is banned in Tamil Nadu, India, how come there's beef on the menu?
  • How to crop complex (vector) graphics in Illustrator
  • Reality after death of the observer; and multiple reality
  • Abortion Debate - Should we teach abstinence (along with condoms and contraceptions) to adolescents as a preventive measure of unwanted pregnancy?
  • \def and \edef: Expansion for one level, not more
  • Can any characterized property give a solid account of why multiplication is a harder computation operation than addition?
  • Interaction clarification with 'Invoke curse' and temporary hitpoints
  • PhD supervisor complaining about not getting paid for supervision
  • Reconstruct a list of strings from its prefixes

how to set static ip address ubuntu 18 04

IMAGES

  1. networking

    how to set static ip address ubuntu 18 04

  2. How to Configure Static IP on Ubuntu 18.04 (Desktop)

    how to set static ip address ubuntu 18 04

  3. How to Configure Static IP on Ubuntu 18.04 (Desktop)

    how to set static ip address ubuntu 18 04

  4. How to Configure Network Static IP Address in Ubuntu 18.04

    how to set static ip address ubuntu 18 04

  5. How to Set a Static IP Address in Ubuntu

    how to set static ip address ubuntu 18 04

  6. How to Configure Static IP Address on Linux System

    how to set static ip address ubuntu 18 04

VIDEO

  1. How to Set Static IP in Ubuntu Server 20.04 & Create New User |Hindi|

  2. How to assign Static IP Address in Ubuntu 17.04

  3. How To Configure Static IP on Ubuntu 22.04 (Jammy Jellyfish)

  4. How to set a static IP Ubuntu 22.04 LTS (3 ways)

  5. Set Static IP address in Linux Mint 21.3 Cinnamon

  6. how to configure static ip in ubuntu 22.0

COMMENTS

  1. How to Configure Static IP Address on Ubuntu 18.04

    In the Activities screen, search for "network" and click on the Network icon. This will open the GNOME Network configuration settings. Click on the cog icon. In "IPV4" Method" section, select "Manual" and enter your static IP address, Netmask and Gateway. Once done, click on the "Apply" button.

  2. How to configure a static IP address in Ubuntu Server 18.04

    The new method. Open up a terminal window on your Ubuntu 18.04 server (or log in via secure shell). Change into the /etc/netplan directory with the command cd /etc/netplan. Issue the command ls ...

  3. How to setup a static IP on Ubuntu Server 18.04

    Stack Exchange Network. Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.. Visit Stack Exchange

  4. How to Set a Static IP Address in Ubuntu

    Set a Static IP in Ubuntu with the GUI. Click the icons at the far-right end of the system bar to show the system menu, then click on the "Wired Connected" menu option. If you're using a wireless connection, instead click the name of your Wi-Fi network. The available connections are displayed.

  5. How to Configure Network Static IP Address in Ubuntu 18.04

    Save the file and exit. Then apply the recent network changes and verify the IP address using following commands. $ sudo netplan apply. $ ifconfig -a. From now on your system will get an IP address dynamically from a router. You can find more information and configuration options by consulting the netplan man page.

  6. Netplan static IP on Ubuntu configuration

    Select IPv4 from the top menu. Select IPv4 to start configuring a new IP address. Choose Manual for the IPv4 settings, enter your desired configuration and hit Apply . Set your desired static IP address. Restart your network by ON/OFF switch. Restart to apply new network settings.

  7. How to Assign Static IP Address on Ubuntu Linux

    Method 2: Switch to static IP address in Ubuntu graphically. If you are on desktop, using the graphical method is easier and faster. Go to the settings and look for network settings. Click the gear symbol adjacent to your network connection. Next, you should go to the IPv4 tab.

  8. Linux Basics

    Ubuntu 12.04 - 17.04 (incl. Ubuntu 16.04 LTS) Step 1: Configure the network interface. Step 2: Configure the DNS servers. Step 3: Restart networking. Configure the Hostname. This tutorial explains how to set up a static IP address on an Ubuntu system from the command line. It covers network configuration for all current versions of Ubuntu and ...

  9. Setting a Static IP Address in Ubuntu 18.04

    To set a static IP address on Ubuntu server 18.04, we will need this network interface name. Using Netplan to Define a Static IP Address. Ubuntu Server 18.04 makes use of a network management tool called Netplan. We will need to modify settings for Netplan so that it attempts to utilize the IP we set when it connects to the router. 1.

  10. Setting a Static IP in Ubuntu

    To open the interface settings, click on the gear icon next to the interface name. Select "Manual" in the IPV4 tab and enter your static IP address, Netmask and Gateway. Click on the Apply button. Manually setting a static IP using Ubuntu Desktop. Verify by using the command ip a.

  11. How To Configure IP Address In Ubuntu 18.04 LTS

    Launch System's settings from top panel. Click on Network tab on the left pane and then click on the gear button under the Wired section. This will open your network card settings window. Navigate to IPv4 section, choose Manual method and finally enter your IP address, Netmask, Gateway etc.

  12. How to Configure Network Static IP Address in Ubuntu 18.04?

    Here are the steps involved in configuring a static IP address using Netplan −. Open your Terminal application by pressing `Ctrl+Alt+T` or searching for "Terminal" on the Ubuntu applications menu. Navigate to "/etc/netplan/" by running this command: `cd /etc/netplan/`.

  13. How to Configure Static IP Address on Ubuntu 18.04

    Click on the cog icon. Select Network icon. 2. This will open the Network interface settings dialog box. Network interface settings dialog box. 3. In "IPV4" Method" section select "Manual", and enter your static IP address, Netmask and Gateway. Click on the "Apply" button once completed.

  14. How to Configure Static IP Address on Ubuntu 20.04

    Depending on the interface you want to modify, click either on the Network or Wi-Fi tab. To open the interface settings, click on the cog icon next to the interface name. In "IPV4" Method" tab, select "Manual" and enter your static IP address, Netmask and Gateway. Once done, click on the "Apply" button.

  15. How To Configure Static IP Address In Ubuntu (Easy Guide)

    In Ubuntu 22.04 LTS, you can set a static IP address via the command line by editing the Netplan configuration files. Let us see how to assign static IP address via Netplan config file. 1. Identify the Network Interface: Use the ip a or ip link command to list your network interfaces.

  16. How to Set Static IP Address and Configure Network in Linux

    To setup static IP address in Debian / Ubuntu, open the following file: address 192.168..100. netmask 255.255.255.. gateway 192.168..1. dns-nameservers 4.4.4.4. dns-nameservers 8.8.8.8. Your static IP address has been configured. You now know how to configure a static IP address on a Linux distro.

  17. Set A Static IP Address On An Ubuntu System

    Locate the dhcp4 item for your network interface and set it to false. Use the following example to add the static IP address information: ethernets: eth0: dhcp4: false routes: - to: default via: 192.168.70.254 nameservers: addresses: [192.168.70.254] Press ctrl+x, y, and enter to save and exit the file.

  18. Configuring networks

    The ip command allows you to configure settings which take effect immediately - however they are not persistent and will be lost after a reboot. To temporarily configure an IP address, you can use the ip command in the following manner. Modify the IP address and subnet mask to match your network requirements.

  19. Ubuntu Static IP configuration

    Open network settings Ubuntu Desktop. Click on the settings icon to start IP address configuration. Start network configuration to set static IP address. Select IPv4 tab. Static IPv4 IP address Ubuntu Desktop. Select manual and enter your desired IP address, netmask, gateway and DNS settings. Once ready click Apply button.

  20. How to Set Up a Firewall with UFW on Ubuntu

    When working with UFW, you can also specify IP addresses within your rules. For example, if you want to allow connections from a specific IP address, such as a work or home IP address of 203.0.113.4, you need to use the from parameter, providing then the IP address you want to allow: sudo ufw allow from 203.0.113.4

  21. How to Set Static IP Address on Ubuntu Server 22.04

    Setting up Static IP address on Ubuntu Server 22.04. Login to your Ubuntu server 22.04, look for the netplan configuration file. It is located under /etc/netplan directory. Run below cat command to view the contents of '00-installer-config.yaml'. Note: Name of configuration file may differ as your per setup.

  22. How To Deploy a React Application with Nginx on Ubuntu

    This tutorial uses Nginx as a web server, but the approach is the same with Apache (Ubuntu 22.04 / Ubuntu 20.04 / Ubuntu 18.04). The main difference is that the configuration files will be in a different directory. To find the directory the web server will use as the root for your project, log in to your server using ssh: ssh username @ server_ip

  23. How do I set a static IP in Ubuntu 20.04.3 LTS?

    If you're using part 2, then my answer says "Use the NetworkManager GUI to setup your static IP for "Wired Connection"". See the IPv4 tab. Click on the manual button. Fill in the address, mask, gateway, and DNS servers, and turn off DNS Auto. - heynnema.

  24. How To Install Linux, Apache, MySQL, PHP (LAMP) Stack on Ubuntu

    Grow your business. The Wave Content to level up your business.; Find a partner Work with a partner to get up and running in the cloud.; Become a partner Join our Partner Pod to connect with SMBs and startups like yours; UGURUS Elite training for agencies & freelancers.

  25. How to configure Certificate Authority on Ubuntu/Debian

    Importing a Certificate Authority. On client systems, you will need to receive the ca.crt file (generated above) from the certificate authority server. This file is easy to identify because it will start with the line: ----BEGIN CERTIFICATE----. To add the certificate authority on Debian and Ubuntu, we would copy the ca.crt file to the following directory: