How to Configure Static IP Address on Ubuntu 22.04 LTS and 22.10

Switching from dynamic IP allocation to static IP addresses is easy on Ubuntu 22.04 "Jammy Jellyfish" and 22.10.

The IP address of most devices today is generated by the Dynamic Host Configuration Protocol (DHCP) server. A DHCP server assigns a dynamic IP address to your device when it's connected to a network. Thus, you have the chance to change this IP address from time to time.

On the other hand, a static IP refers to a fixed, immutable address, different from dynamic IPs. You can set static IP settings for Ubuntu versions 22.04 LTS and 22.10 in three different ways. Here's how to get started.

Set a Static IP on Ubuntu With the nmcli Command

It's pretty easy to configure Ubuntu 22.04 static IP settings using the nmcli command . nmcli is a text-based utility used to check the status of the wired connections you are using on your device.

With this command, you can access additional networking information such as your connection status, the name of your host device, and general permissions in your network configuration. Also, this command is very useful in your Ubuntu server static IP settings.

You can get information about your connection with the following command:

The output of this command will be as follows:

Create a static link with the command given below. Then, manually configure the enp0s3 and ipv4 settings with the appropriate parameters in the nmcli command:

If you use the nmcli connection show command again, you can see that the static link has been added.

After this process, add the static connection you created to the DNS IP:

Now use the command below to activate the connection:

If the output displays "connection successfully activated," you've successfully set up a static IP address on your machine.

You can consider using static IP addresses to avoid connection problems caused by dynamic IP addresses. A static IP address allows you to have a fixed identity and location when connected to the internet.

You can verify the static IP you want to assign to your device by running the following command:

Using Netplan for Static IP Settings on Ubuntu

Just like nmcli, another command you can use for setting a static IP on Ubuntu is netplan. You can easily make Ubuntu static IP settings using the netplan command in 22.04 LTS and 22.10 versions. To do this, follow the steps below.

First, find out the name of your network interface using the command below:

What you see here is your network interface name. This name may be different on each device.

Now, create a file named 01-netcfg.yaml in the /etc/netplan folder. Edit it with your favorite text editor.

Add the following lines to the file:

As you can see, you have disabled the DHCP IP setting with the dhcp4: no statement. You've then added the IP address and DNS settings assigned by Google.

After saving this file, run the following command to apply the changes:

Configure Static IP Settings on Ubuntu Graphically

The graphical network interface in Ubuntu 22.04 is quite useful if you don't want to use the command line. So much so that you can easily set the Ubuntu static IP address using this interface.

To do this, click on the Network icon in the upper right corner of your desktop. Then, select Wired Settings from the drop-down menu. Click on the Gear icon to open the settings window.

Then, switch to the IPv4 tab in the window that opens.

As you can see, DHCP is enabled by default. Change the IPv4 Method to Manual as you want to use a static IP instead of a dynamic one. Next, change your address, netmask, and gateway settings. Finally, modify your DNS setting and click the Apply button.

You must restart this wired connection for all these actions to take effect. To do this, simply toggle the switch next to the network name on and then off.

Why Should You Use Static IP Addresses?

You learned how to configure static IP settings in "Jammy Jellyfish" 22.04, the latest LTS version of Ubuntu, and 22.10, using both the graphical settings interface and the two terminal commands: nmcli and netplan. Also, now you know how to set a static IP on Ubuntu server 22.04.

Due to insufficient IP addresses, some service providers may assign the same address to two different users. In this case, connection problems can occur. Using static IP addresses instead does not cause such problems as it is user-specific, but beware as someone can misuse your IP address in several ways.

How to Set a Static IP Address On Ubuntu 22.04

The first task anyone would do after installing Ubuntu is setting an IP address to a system to connect to the network/internet. If the Wi-Fi router, ISP, or network doesn’t provide DHCP services, you must manually assign IP addresses.

Here, we will see how to set a static IP Address on Ubuntu 22.04, using,

You can use any method to set a static IP address on Ubuntu 22.04.

Find Network Interfaces on Ubuntu 22.04

You can run any of the below commands in a terminal to get a list of network interfaces available on the system.

The output of the ifconfig command on a desktop:

Here, we will see how to configure a static IP for enp0s3 (Wired) / wl01 (Wi-Fi).

IP Address : 192.168.0.10 Netmask : 255.255.255.0 Gateway : 192.168.0.1 DNS Server 1 : 192.168.0.1 DNS Server 2 : 8.8.8.8 Domain Name : itzgeek.local

Set Static IP Address on Ubuntu 22.04 Desktop

1. using gnome network manager.

Using the GNOME network control center to set a static IP address on In Ubuntu 22.04 desktop is straightforward.

Set IP for Wired Interface using GNOME

Open the Gnome control center using the gnome-control-center network command or go to Activities >> Settings >> Network .

Click on the gear icon on the Wired interface page and then IPv4 tab >> Manual >> Enter IP address, Netmask, Gateway, DNS (Toggle to disable Automatic DNS configuration) >> Apply .

Finally, use the toggle in the Network page to disable and enable the network interface to apply the IP address.

Set IP Address for Wi-Fi using GNOME

Click on your Wifi router name and then enter the router’s password to connect. Your laptop will automatically receive an IP address from a Wi-Fi router with a built-in DHCP service on a successful connection.

To assign a static IP address or Wi-Fi interface, click on the gear icon on the Wi-Fi interface page and then IPv4 tab >> Manual >> Enter IP address, Netmask, Gateway, DNS (Toggle to disable Automatic DNS configuration) >> Apply .

Finally, disable and enable the Wi-Fi interface to apply the IP address.

2. Using Netplan

Netplan is a utility for easily configuring networking on a Ubuntu system. It reads the configuration files .yaml present in the /etc/netplan directory.

3. Using NetworkManager CLI

Set ip for wired interface using nmcli.

First, let us list the available network connections.

Then, configure static IP address to wired interface.

Finally, run the below commands to apply the IP address.

Set IP Address for Wi-Fi using nmcli

First, list the available Wi-Fi access points using the below command.

Next, connect to the Wi-Fi access point.

Finally, run the below commands to apply the IP address

Set Static IP Address Using NetPlan on Ubuntu 22.04 Server

Netplan is a network configuration utility that reads YAML files and generates all network configurations for the renderer tool (NetworkManager or networkd) to configure the network on a system.

Netplan configuration files are found in the /etc/netplan/ directory.

Set IP for Wired Interface using Netplan

Now, create a new netplan configuration for the wired network interface.

Then, make changes to the below information and use it for your requirement.

Finally, apply all network configurations and restart renderers.

Set IP Address for Wi-Fi using Netplan

Wi-Fi Interface Name : wl01 Wireless Access Point Name : Raj Wireless Access Point Password :  MyPass

First, create a new netplan configuration for the wired network interface.

And then generate the required configuration for the renderers.

Verify Static IP Address on Ubuntu 22.04

Verify the static IP address using the below commands.

Also, verify the DNS server’s entries.

That’s All.

How to Install Brave Browser on Fedora 36 / Fedora 35

How to Install phpMyAdmin with Nginx on Ubuntu 22.04

How to Install MySQL on Ubuntu 22.04

How to Install Cacti on Ubuntu 22.04

How to Install pgAdmin on Ubuntu 22.04 / Ubuntu 20.04

How to Set up DNS Server on Ubuntu 22.04 / Ubuntu 20.04

How to Install PostgreSQL on Ubuntu 22.04

How to Install Plex on Ubuntu 22.04

Ezoic

Complete Guides by How-To Geek

Our latest product roundups, reader favorites, more from how-to geek, latest geek news, latest reviews, across lifesavvy media.

Join 425,000 subscribers and get a daily digest of news, geek trivia, and our feature articles.

By submitting your email, you agree to the Terms of Use and Privacy Policy .

How to Set a Static IP Address in Ubuntu

Dave McKay first used computers when punched paper tape was in vogue, and he has been programming ever since. After over 30 years in the IT industry, he is now a full-time technology journalist. During his career, he has worked as a freelance programmer, manager of an international software development team, an IT services project manager, and, most recently, as a Data Protection Officer. His writing has been published by  howtogeek.com, cloudsavvyit.com, itenterpriser.com, and opensource.com. Dave is a Linux evangelist and open source advocate. Read more...

Lowell is the founder and CEO of How-To Geek. He’s been running the show since creating the site back in 2006. Over the last decade, Lowell has personally written more than 1000 articles which have been viewed by over 250 million people. Prior to starting How-To Geek, Lowell spent 15 years working in IT doing consulting, cybersecurity, database management, and programming work. Read more...

Linux laptop showing a bash prompt

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.

Dynamic and Static IP Addresses Setting a Static IP Address in Ubuntu Using the GNOME Desktop and Applications Connection Convenience

Dynamic and Static IP Addresses

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 .

Setting a Static IP Address in Ubuntu

We’re demonstrating this technique on Ubuntu, but it ought to work on any Linux distribution. The nmcli network manager 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.

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

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

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

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 your current IP address. 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.

Even if another device had previously used that IP address, it’ll be given a new IP address when it next boots up. Nothing is responding to the ping requests. 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.”

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.

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

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.

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.”

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

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

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.

Using the GNOME Desktop and Applications

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. Our new connection is the active connection. Click the “Wired Settings” or “Wi-Fi Settings” menu option.

The details of the active connection are displayed. We can see our new “static-ip” connection has the IP address, default gateway, and DNS servers that we set for it. You can swap between the available connections by clicking directly on their names.

Click the cog icon to enter the settings for the “static-ip” connection.

A dialog box opens. Click on the “IPv4” tab.

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.

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

A dialog appears. We need to provide a name for this connection.

We’re calling our new connection “static-2.” Click the “IPv4” tab.

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.

RELATED: How to Assign a Static IP Address in Windows 10 or 11

Connection Convenience

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.

RELATED: How to Use bmon to Monitor Network Bandwidth on Linux

how to change ip address ubuntu 22 04

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

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.

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.

In the above file we have used following,

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,

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.

4 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!

Leave a Comment Cancel reply

Stack Exchange Network

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

Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.

Q&A for work

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

How to change ip address in ubuntu desktop through command line

In Ubuntu desktop 13.04 changing /etc/network/interfaces file don't change ip address or convert DHCP to static network interface configuration. after changing the file I tried

----------EDIT----------

I have connected to system with ssh.

Necktwi's user avatar

6 Answers 6

By default, Ubuntu (or Network Manager to be specific) ignores the /etc/network/interfaces file. To make the changes you made take effect, execute the following commands:

Assuming that wlan0 is the interface you are editing. Once you do that, wlan0 will come up with the settings you have under its stanza in /etc/network/interfaces .

Edit: since you're connected through SSH. You can try the following:

Edit /etc/NetworkManager/NetworkManager.conf and change ifdown managed to false :

Community's user avatar

Try this. Just press Ctrl + Alt + T on your keyboard to open Terminal. When it opens, run the command(s) below:

This is done with the help of guntbert

Once done save and exit

add this line DHCP mode

Static mode

Once done save the file, and:

Mitch's user avatar

You can change your ip address by using the following script:

Open terminal with Ctrl + Alt + t and type the following command:

Find eth0 section and setup IP address as follows:

Save and close the file. Once done, restart network:

Verify new IP address by using the following command :

Seth's user avatar

I am posting this answer to give another dimension to the question and existing answers, not as a direct answer to the original question. Your IP will be lost at reboot. However, I think it's worth you understanding these commands, iproute2 package is the currently method of on-the-fly interface management via the CLI. Lots of people are still writing scripts using ifconfig for example.

I think it's worth noting the use of the iproute2 packages;

Show current IPs on all interface ( ip addr )

Add an IP address to my wireless interface ( ip addr add )

Show my IP addresses again, note the additional IP on wlan0 ( ip addr )

Show the link state of my interfaces ( ip link )

Delete this 2nd IP address from my wireless interface ( ip addr delete )

Show IP addresses just for wlan0 to check ( ip addr show wlan0 )

The same commands could have been used to remove my current IP, 172.22.0.221 then add another, but I would have lost connectivity, which I can't right now. Below are those commands though, after which I would also need to add a new default route route;

jwbensley's user avatar

From t he detailed instructions on this site :

steampowered's user avatar

This is the right way to do it.

lewis4u's user avatar

Your Answer

Sign up or log in, post as a guest.

Required, but never shown

By clicking “Post Your Answer”, you agree to our terms of service , privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged command-line networking network-manager or ask your own question .

Hot Network Questions

how to change ip address ubuntu 22 04

Your privacy

By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy .

How To Set A Static Ip Address In Ubuntu

By default, a device connected to your home router, whether it is connected via cable or Wi-Fi, will most likely receive a dynamic IP address. If you also use your managed Ubuntu VPS as an FTP or web server, you want to configure a static IP address for it so that you can reach the server using the same IP address. In this tutorial, we will show you how to configure a static IP address on Ubuntu 20.04. We have mentioned steps below to Set a Static IP Address in Ubuntu

Steps to Set a Static IP Address in Ubuntu #

Final words #.

We hope like our article on how to Set a Static IP Address in Ubuntu. The IP address of most devices today is generated by a Dynamic Host Configuration Protocol (DHCP) server. A DHCP server assigns a dynamic IP address to your device when it is connected to a network. So you have the possibility to change this IP address from time to time. A static IP, on the other hand, is a fixed, unchanging address that is different from dynamic IPs. You can set static IP settings in Ubuntu 22.04 LTS in three different ways. Here’s how to get started.

How to change from DHCP to Static IP Address in Ubuntu 22.04

Dynamic Host Configuration Protocol is commonly known as DHCP, used in the networking as a network protocol and it helps different devices to connect with a specific IP address. As the name is telling its dynamic so it changes and assigns different IP addresses to the devices which is very much helpful if we talk about the security of devices because it’s unable to access the IP address.

Sometimes we want the same IP address so in this write-up, we will change the DHCP of our machine to the permanent static IP address in Ubuntu.

How to change from DHCP to a static IP address on Ubuntu 22.04

To learn the method of changing from DHCP to a static IP address, first we have to find out the IP address of our machine which can find out by using the command:

how to change ip address ubuntu 22 04

We will open the networking tool of Ubuntu which is known as nmtui by using the command:

how to change ip address ubuntu 22 04

Please enable JavaScript

A menu of NetworkManager will be displayed from which we can choose the “Edit a connection”:

how to change ip address ubuntu 22 04

Now choose your connection and click on the “Add”:

how to change ip address ubuntu 22 04

The details of the connection are being displayed:

how to change ip address ubuntu 22 04

Change the mode of a configuration of IPv4 from “Automatic” to “Manual” using the command:

how to change ip address ubuntu 22 04

When you are done, scroll down the menu and click on the “Ok” button to save the settings:

how to change ip address ubuntu 22 04

Click on the “Back” to go back the menu:

how to change ip address ubuntu 22 04

Click on the “Activate a connection” to make it active:

how to change ip address ubuntu 22 04

Again click on “Activate”:

how to change ip address ubuntu 22 04

And click on the “Back” to save the settings:

how to change ip address ubuntu 22 04

Now Quit as the DHCP is changed to the static IP address:

how to change ip address ubuntu 22 04

In the terminal run the command to check the new assigned IP address:

Another approach to change the DHCP to static IP address is by going on the “Network” section in the Settings, and then click on the “Settings icon” next to the connected button:

how to change ip address ubuntu 22 04

Click on the “Manual” and insert the information of “Address”, “Netmask”, “Gateway”, and “DNS”:

how to change ip address ubuntu 22 04

Toggle the button off and then turn on to apply the new changes:

how to change ip address ubuntu 22 04

Again click on the setting icon to open the details of the network connection:

how to change ip address ubuntu 22 04

The changes have successfully been applied.

DHCP assigns and uses the dynamic IP addresses to the machine which are beneficial for security reasons but we can also change it to a static IP address by the two different methods which are discussed in this guide for Ubuntu 22.04.

TUTORIALS ON LINUX, PROGRAMMING & TECHNOLOGY

[email protected]

Ezoic

LinuxWays Logo

How-tos and tutorials for sys admins

How to Change the IP Address in Ubuntu

How_to_Change_the_IP_Address_in_Ubuntu

Ubuntu, being a predominantly Linux operating system, has several programs to assist us in completing various tasks. It’s crucial to understand how to update your computer’s IP address since it allows you to transport any sort of data over a network. In this post, we’ll go through the two distinct methods for changing IP addresses on your Ubuntu system.

An IP address, or Internet Protocol address, is a numeric address assigned to various computers and networked devices that use the Internet Protocol. An IP address is used to both identify and determine the location of a machine. Every IP address on the network is unique, allowing for better communication between all connected devices. There are two sorts of IP addresses: public and private (public and private). Your public IP-address is used to communicate via the Internet in the same manner that your physical address is used for postal mail. In the other hand, every device on a local network is given a private IP address that is unique within its sub-network.

Another distinction between IPv4 and IPv6 protocols may be made. IPv4 is the most used IP format, consisting of a four-part structure with four bytes separated by dots (e.g., 192.168.1.3). Apart from the fact that as the number of devices increases, it becomes increasingly difficult to keep track of them all, IPv4 may soon run out of addresses. That is why, in contrast to IPv4, IPv6 was invented.

Change IP Address in Ubuntu

There are two ways through which your IP address can be changed in Ubuntu:

A brief detail of both methods is explained below:

How to Change IP Address Using Command Line Method

The Command-Line method is a simple and mostly used way in Linux to change your IP address in Ubuntu. First, run the mentioned below command to check active network interfaces:

Text Description automatically generated

After listing network interfaces, open the file named as “/etc/netplan/*.yaml” in nano editor by using the command mentioned below:

how to change ip address ubuntu 22 04

“/etc/netplan/*.yaml” file will open a new page having following information:

C:\Users\falcon\Desktop\Screenshot_3.png

In the “/etc/netplan/*.yaml” file write the mentioned below code in order to change the IP address:

C:\Users\falcon\Desktop\Screenshot_1.png

After writing the code, press “CTRL+O” to save the changes, and to apply the settings run the mentioned below command:

how to change ip address ubuntu 22 04

Now, run the mentioned below command to check the modified IP address of the “enpos3”

By running this command, you can get a modified IP address of any network interface on your Ubuntu system.

Text Description automatically generated

How to Change IP Address Using GUI (Graphical User Interface) Method

If you don’t know how to use the command line or you are facing any difficulty in the application of commands, you can also check IP addresses by another method.

Mentioned below are the steps to change IP-address using GUI.

Step 1: Application Menu (Settings)

Open the Ubuntu Applications Menu which is provided in the left corner of the screen (denoted by the nine dots symbol) and then search for “Settings” option and click on the icon:

Graphical user interface, application Description automatically generated

Step 2: Network Settings

Settings Menu will be shown after clicking the “settings” icon. In settings options, go to “Network”.

Graphical user interface, text, application, email Description automatically generated

Step 3: IP Address Details

When you press the “gear icon” given after your connection, a window will get opened that contain more setting and information of your connection with network and IP-address. In order to change IPv4 address, click on the “IPv4” tab.

Graphical user interface, text, application, email Description automatically generated

Step 4: Changing IP Address Details

After selecting the IPv4 tab, select the method as “manual” enter details of your own choice and then click on the “apply” button.

Graphical user interface, text, application Description automatically generated

Step 5: Applying New Settings

After clicking on the “apply” button, in order to apply new IP settings, turn the switch OFF and ON.

Graphical user interface, application, email Description automatically generated

Step 6: Checking New Settings

In order to check whether new settings are applied or not, click on the “gear icon” and then go to the “details” option provided in the network settings icon and new IPv4 address settings will be obtained.

Graphical user interface Description automatically generated with medium confidence

In this article, the basic overview of IP addresses, their types, and the contrast between the IPv4 and IPv6 protocols is being provided. The two different ways through which you can change your IP address in Ubuntu Linux are being discussed in this article as well. These approaches include the command line approach and the GUI approach.

Karim Buzdar

Karim Buzdar holds a degree in telecommunication engineering and holds several sysadmin certifications including CCNA RS, SCP, and ACE. As an IT engineer and technical author, he writes for various websites.

Similar Posts

How_to_Find_the_MAC_Address_in_Ubuntu

How to Find the MAC Address in Ubuntu

Top 7 Free and Open-Source Security Tools

Top 7 Free and Open-Source Security Tools

How_to_Configure_Your_Linux_Firewall_to_Best_Protect_Your_Data_Center

How to Configure Your Linux Firewall to Best Protect Your Data Center

How to Change Ubuntu IP address

Rachelle J. Alley

Ubuntu ip address: how to change ubuntu ip address in terminal through netplan, how to use gui to change the ubuntu ip address, ubuntu linux change ip using command line config file, how to statically assign an ubuntu ip address.

Final Thoughts

Change-IP-Address-on-Ubuntu

While working on Ubuntu systems, many situations force you to change the IP address. In this article, we will reveal how to change Ubuntu IP address. You can easily modify the designated IP address on your system through “netplan” or by using the Ubuntu GUI Network settings.

The basic tool used to change network preferences in Ubuntu is called netplan. This tool corresponds with the kernel via NetworkManager daemons and systemd-networkd, also termed as renderers. Netplan collects the configurations of the network through “/etc/netplan/*.yaml” files while making the configuration preferences for all interfaces of the network.

There are many ways to change IP Address on ubuntu like using best VPN for Ubuntu , or through netplan or terminal etc. Here we’ll learn about how to change IP address on Ubuntu through terminal and GUI.

First thing first, to change Ubuntu IP address, enlist the running network interfaces by running the Ubuntu “ip” command. This command is used in Ubuntu to rearrange interfaces and assign or delete routes, etc.

If you add “link” in the “ip” command it will show the name, link-layer details, the status of an interface, etc. Run the following “ip link” command to get more information about your network systems:

Next step involves opening the “/etc/netplan/*.yaml” file in editor:

Up next, write the code given below in the “/etc/netplan/*.yaml” file to alter the IP address on your computer:

               version: 2

               renderer: networkd

               ethernets:          

                              enp0s3:

                              dhcp4: no

                              dhcp6: no

                              addresses: [192.168.2.2/24]

                              gateway4:  192.168.2.2

                              nameservers:

Now hit “CTRL+O” to reserve the changes done in the file.

After saving, apply the changed settings by using the following netplan command in your terminal:

Next, confirm whether the IP address of the “enpos3” network interface is modified or not:

After running this command, the result will show a modified IP address.

Ubuntu also offers the convenience to modify the IP address of the network interface using its GUI portal. Here’s how you can do that:

Follow these steps to change Ubuntu IP address using Command Line Config File:

Launch terminal and write the following command:

sudo vi /etc/network/interfaces

Go to the eth0 section and set up the IP address as desired.

Now save and close the file and restart the network through this command:

To confirm the new IP address run this command:

$ ifconfig eth0

Whenever you are connected to a network, your device immediately gets an IP address from the network. There are two types of IP addresses ; static and dynamic. Let’s find out how to assign a static IP address .

FAQs – Ubuntu IP Address

How do i change my ip address in the linux terminal.

Run the “ifconfig” command accompanied by the network interface name and the new IP address you wish to change on your system. For the subnet mask, you can add a “netmask” clause along with the subnet mask or utilize the CIDR code straightaway.

How do I set a static IP in the Ubuntu terminal?

Here is how to set up a static IP address using the command line in Ubuntu:

How do I find my IP address in the Ubuntu terminal?

Follow the steps below to find your IP address in Ubuntu 20.04:

Ubuntu offers the option to modify the network interface IP address , whether you are doing it for running any media server on your device or port forwarding.

Netplan is the network management tool in the Ubuntu system that is used to configure and manage the network settings.

In this article, we have elaborated on how to change Ubuntu IP address using the “netplan” tool through the Ubuntu terminal, as well as the method for modifying the IP address through Ubuntu GUI.

'Rachelle J. Alley

Rachelle J. Alley's Biography :

Tech enthusiast by day, movie fanatic by night. Rachelle spends her week consuming numerous cups of coffee and typing her way into online privacy and security. Weekends, in her life, call for binge-reading her favorite books and multiple naps.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

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

By submitting this form you agree to our Terms of service and Privacy Policy

How to Check IPv4 Address on Ubuntu 22.04

Question – How to find static IP Address of My Ubuntu Desktop system? 2 Ways to find IP Address on Ubuntu 22.04 Desktop and server editions?

Ubuntu 22.04 desktop edition comes with an attractive Gnome Desktop Environment. You can either use the command prompt to check the current IP address on your system or use a GUI option to view the local IP address on your system.

You can also use another article to change IP address on Ubuntu 22.04 desktop and server editions.

Choose one of the below methods to check the current IP address on a Ubuntu system.

Method 1: Checking IP Address via Command Line on Ubuntu 22.04

The Ubuntu desktop users Press CTRL+ALT+T to open the terminal and the server user connects to the system over SSH.

Once you get the terminal access, execute the ip addr show or its short version ip a command to view all the configured IPv3 addresses on network intefaces.

You will see all the assigned ipv4 addresses on network interfaces.

The above output shows that the 192.168.1.212 IP with 24 netmark is configured on the system

Method 2: Checking IP Address in Ubuntu 22.04 Desktop

To follow this method, you must have a desktop environment on your Ubuntu system. Now,

In this tutorial, you have learned to find the currently configured IP address on a Ubuntu system. Hope this tutorial provides you with the right instruction and is helpful for you.

Related Posts

A step-by-step guide to installing opendkim with postfix on ubuntu – unleash the power of dkim, how to install composer on ubuntu 22.04, how to create sftp user in ubuntu 22.04 (no shell access), leave a reply cancel reply.

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

Type above and press Enter to search. Press Esc to cancel.

IMAGES

  1. How to: Change your IP Address on Ubuntu Server 12.04 to a Static Address

    how to change ip address ubuntu 22 04

  2. How to change the IP address on Ubuntu

    how to change ip address ubuntu 22 04

  3. How to change from DHCP to Static IP Address in Ubuntu 20.04?

    how to change ip address ubuntu 22 04

  4. How to change the IP address on Ubuntu

    how to change ip address ubuntu 22 04

  5. How to change the IP address on Ubuntu

    how to change ip address ubuntu 22 04

  6. How to Change IP Address on Ubuntu

    how to change ip address ubuntu 22 04

VIDEO

  1. Файл HOSTS отсутствует в Windows 11 или Windows 10

  2. How To Hosting Website By Using Apache On Ubuntu 22.10

  3. How to Modify and changed Static IP address in Ubuntu 22.04 LTS

  4. Set Static IP address inside Ubuntu Server 20.04

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

  6. Local sunucunuza dünyanın her yerinden ulaşın

COMMENTS

  1. How to Configure Static IP Address on Ubuntu 22.04 LTS and 22.10

    You can easily make Ubuntu static IP settings using the netplan command in 22.04 LTS and 22.10 versions. To do this, follow the steps below. First, find out the name of your network interface using the command below: sudo ip a What you see here is your network interface name. This name may be different on each device.

  2. How to Set a Static IP Address On Ubuntu 22.04

    Click on the gear icon on the Wired interface page and then IPv4 tab >> Manual >> Enter IP address, Netmask, Gateway, DNS (Toggle to disable Automatic DNS configuration) >> Apply. Set IP for Wired Interface Finally, use the toggle in the Network page to disable and enable the network interface to apply the IP address.

  3. Ubuntu 22.04 Network Setup

    You can configure a static IP address on Ubuntu 22.04 Jammy Jellyfish either from command or GUI. First, we will cover the instructions to configure one from GNOME GUI. Start by opening Settings and click on Network menu and hit the gear wheel of the desired network interface. Next, click the IPv4 tab, and then the manual configuration option.

  4. How to Configure Static IP Address on Ubuntu 22.04

    Method 1: Configuring Static IPv4 Address on Ubuntu 22.04 Desktop The Ubuntu Desktop editions have a graphical interface for configuring the network interfaces. Follow the below steps to configure a static IP address on Ubuntu 22.04 Desktop system. ADVERTISEMENT Click the network icon in the upper-right corner.

  5. How to Set a Static IP Address in Ubuntu

    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.

  6. How to Configure Static IP Address on Ubuntu 22.04 LTS

    Using nmcli command line utility, we can configure static ip on ubuntu 22.04. Procedure and commands are listed below, Run below command to identify the device name, $ nmcli connection show To assign the static IP address, create a connection with name 'static ip' and use interface as 'enp0s3', run beneath command

  7. 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. $ cd /etc/netplan/ $ ls -l total 4 -rw-r--r-- 1 root root 116 Oct 12 04:03 00-installer-config.yaml $ Run below cat command to view the contents of '00-installer-config.yaml'

  8. How to configure static IP address on Ubuntu 22.04 Jammy Jellyfish

    Configure static IP address on Ubuntu 22.04 Server To apply the new Netplan changes execute: $ sudo netplan apply Alternatively, if you run into some issues run: $ sudo netplan --debug apply Confirm your new static IP address by using the ip Linux command : $ ip a Check current IP address Troubleshooting

  9. How to permanently change the IP address of Ubuntu with CLI only?

    using only cli to change the IP address, since the HW is not accessible and the script is changing the IP address through SSH, so it has to be the only cli The changes to be permanent, the IP address shouldn't be lost on restart This should be applicable to all the version of ubuntu

  10. Network configuration

    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. sudo ip addr add 10.102.66.200/24 dev enp0s25 The ip can then be used to set the link up or down. ip link set dev enp0s25 up ip link set dev enp0s25 down

  11. How to Configure Static IP Address on Ubuntu 20.04

    In "IPV4" Method" tab, select "Manual" and enter your static IP address, Netmask and Gateway. Once done, click on the "Apply" button. To verify the changes, open your terminal either by using the Ctrl+Alt+T keyboard shortcut or by clicking on the terminal icon and run: ip addr The output will show the interface IP address:

  12. How to change ip address in ubuntu desktop through command line

    n2:~$ ip r s default via 172.22..1 dev wlan0 proto static 169.254../16 dev wlan0 scope link metric 1000 172.22../24 dev wlan0 proto kernel scope link src 172.22..221 metric 2 192.168.122./24 dev virbr0 proto kernel scope link src 192.168.122.1 ip a del 172.22..221/24 dev wlan0 ip a a 172.22..10/24 dev wlan ip r a default via 172.22..1 ...

  13. How To Set A Static Ip Address In Ubuntu

    So you have the possibility to change this IP address from time to time. A static IP, on the other hand, is a fixed, unchanging address that is different from dynamic IPs. You can set static IP settings in Ubuntu 22.04 LTS in three different ways. Here's how to get started.

  14. Configure Static IP Address on Ubuntu 22.04|20.04|18.04

    Method 1: Manually edit Network Configuration files To get a Static Ip Address on Ubuntu server 22.04|20.04|18.04, you'll edit interfaces configuration file located at /etc/network/interfaces. You can use vi / vim editor or nano editor for this purpose.

  15. How to change from DHCP to Static IP Address in Ubuntu 22.04

    How to change from DHCP to a static IP address on Ubuntu 22.04 To learn the method of changing from DHCP to a static IP address, first we have to find out the IP address of our machine which can find out by using the command: $ ip a We will open the networking tool of Ubuntu which is known as nmtui by using the command: $ nmtui

  16. How to Change the IP Address in Ubuntu

    After writing the code, press "CTRL+O" to save the changes, and to apply the settings run the mentioned below command: $ sudo netplan apply. Now, run the mentioned below command to check the modified IP address of the "enpos3". $ ip a. By running this command, you can get a modified IP address of any network interface on your Ubuntu system.

  17. How to Set Static IP in Ubuntu Server 22.04

    Ubuntu is a common server choice for beginner... What's up, Guys!!! In this video, I walk through how to set a static IP address in Ubuntu 22.04 Server Edition.

  18. How to Change Ubuntu IP address

    Launch Settings and click the Network tab in the menu on the left. Click on the gear icon to alter the selected network's IP address. Next up, select the "IPv4" section from the menu. Uncheck the Automatic (DHCP) option under the IPv4 menu and select "Manual.".

  19. How to Check IPv4 Address on Ubuntu 22.04

    Method 1: Checking IP Address via Command Line on Ubuntu 22.04. The Ubuntu desktop users Press CTRL+ALT+T to open the terminal and the server user connects to the system over SSH. Once you get the terminal access, execute the ip addr show or its short version ip a command to view all the configured IPv3 addresses on network intefaces.

  20. Change IP address on ubuntu 20.04 Desktop

    In this video, I am showing how to assign static IP address to Ubuntu 20.04 desktop machine.We can do it in two ways. I am using the GUI to change the IP add...