{"id":16452,"date":"2022-04-02T05:22:54","date_gmt":"2022-04-02T05:22:54","guid":{"rendered":"https:\/\/linuxways.net\/?p=16452"},"modified":"2022-04-02T05:22:54","modified_gmt":"2022-04-02T05:22:54","slug":"how-to-change-the-ip-address-in-ubuntu","status":"publish","type":"post","link":"https:\/\/linuxways.net\/de\/ubuntu\/how-to-change-the-ip-address-in-ubuntu\/","title":{"rendered":"How to Change the IP Address in Ubuntu"},"content":{"rendered":"<p>Ubuntu, being a predominantly Linux operating system, has several programs to assist us in completing various tasks. It&#8217;s crucial to understand how to update your computer&#8217;s IP address since it allows you to transport any sort of data over a network. In this post, we&#8217;ll go through the two distinct methods for changing IP addresses on your Ubuntu system.<\/p>\n<p>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.<\/p>\n<p>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.<\/p>\n<h2>Change IP Address in Ubuntu<\/h2>\n<p>There are two ways through which your IP address can be changed in Ubuntu:<\/p>\n<ul>\n<li>Change IP address Using Command Line Method<\/li>\n<li>Change IP address Using GUI (Graphical User Interface) Method<\/li>\n<\/ul>\n<p>A brief detail of both methods is explained below:<\/p>\n<h2>How to Change IP Address Using Command Line Method<\/h2>\n<p>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:<\/p>\n<table>\n<tbody>\n<tr>\n<td>\n<pre><strong>$ ip link<\/strong><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"719\" height=\"131\" class=\"wp-image-16453\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/04\/text-description-automatically-generated.png\" alt=\"Text Description automatically generated\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/04\/text-description-automatically-generated.png 719w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/04\/text-description-automatically-generated-300x55.png 300w\" sizes=\"auto, (max-width: 719px) 100vw, 719px\" \/><\/p>\n<p>After listing network interfaces, open the file named as \u201c\/etc\/netplan\/*.yaml\u201d in nano editor by using the command mentioned below:<\/p>\n<table>\n<tbody>\n<tr>\n<td>\n<pre><strong>$ sudo nano \/etc\/netplan\/*.yaml<\/strong><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"687\" height=\"64\" class=\"wp-image-16454\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/04\/word-image-8.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/04\/word-image-8.png 687w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/04\/word-image-8-300x28.png 300w\" sizes=\"auto, (max-width: 687px) 100vw, 687px\" \/><\/p>\n<p><strong> \u201c\/etc\/netplan\/*.yaml\u201d<\/strong> file will open a new page having following information:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"710\" height=\"479\" class=\"wp-image-16455\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/04\/c-users-falcon-desktop-screenshot_3-png.png\" alt=\"C:\\Users\\falcon\\Desktop\\Screenshot_3.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/04\/c-users-falcon-desktop-screenshot_3-png.png 710w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/04\/c-users-falcon-desktop-screenshot_3-png-300x202.png 300w\" sizes=\"auto, (max-width: 710px) 100vw, 710px\" \/><\/p>\n<p>In the <strong>\u201c\/etc\/netplan\/*.yaml\u201d<\/strong> file write the mentioned below code in order to change the IP address:<\/p>\n<table>\n<tbody>\n<tr>\n<td>\n<pre><strong>network:<\/strong>\r\n\r\n<strong> version: 2<\/strong>\r\n\r\n<strong> renderer: networkd<\/strong>\r\n\r\n<strong> ethernets:<\/strong>\r\n\r\n<strong> enp0s3:<\/strong>\r\n\r\n<strong> dhcp4: no<\/strong>\r\n\r\n<strong> dhcp6: no<\/strong>\r\n\r\n<strong> addresses: [192.168.2.2\/24]<\/strong>\r\n\r\n<strong> gateway4: 192.168.2.2<\/strong>\r\n\r\n<strong> nameservers:<\/strong>\r\n\r\n<strong> addresses: [8.8.4.4, 8.8.8.8]<\/strong><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<pre><img loading=\"lazy\" decoding=\"async\" width=\"719\" height=\"485\" class=\"wp-image-16456\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/04\/c-users-falcon-desktop-screenshot_1-png.png\" alt=\"C:\\Users\\falcon\\Desktop\\Screenshot_1.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/04\/c-users-falcon-desktop-screenshot_1-png.png 719w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/04\/c-users-falcon-desktop-screenshot_1-png-300x202.png 300w\" sizes=\"auto, (max-width: 719px) 100vw, 719px\" \/><\/pre>\n<p>After writing the code, press \u201cCTRL+O\u201d to save the changes, and to apply the settings run the mentioned below command:<\/p>\n<table>\n<tbody>\n<tr>\n<td>\n<pre><strong>$ sudo netplan apply<\/strong><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"697\" height=\"84\" class=\"wp-image-16457\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/04\/word-image-9.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/04\/word-image-9.png 697w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/04\/word-image-9-300x36.png 300w\" sizes=\"auto, (max-width: 697px) 100vw, 697px\" \/><\/p>\n<p>Now, run the mentioned below command to check the modified IP address of the \u201cenpos3\u201d<\/p>\n<table>\n<tbody>\n<tr>\n<td>\n<pre><strong>$ ip a<\/strong><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>By running this command, you can get a modified IP address of any network interface on your Ubuntu system.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"717\" height=\"295\" class=\"wp-image-16458\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/04\/text-description-automatically-generated-1.png\" alt=\"Text Description automatically generated\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/04\/text-description-automatically-generated-1.png 717w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/04\/text-description-automatically-generated-1-300x123.png 300w\" sizes=\"auto, (max-width: 717px) 100vw, 717px\" \/><\/p>\n<h2>How to Change IP Address Using GUI (Graphical User Interface) Method<\/h2>\n<p>If you don&#8217;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.<\/p>\n<p>Mentioned below are the steps to change IP-address using GUI.<\/p>\n<h3>Step 1: Application Menu (Settings)<\/h3>\n<p>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 \u201cSettings\u201d option and click on the icon:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"457\" height=\"239\" class=\"wp-image-16459\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/04\/graphical-user-interface-application-description.png\" alt=\"Graphical user interface, application Description automatically generated\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/04\/graphical-user-interface-application-description.png 457w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/04\/graphical-user-interface-application-description-300x157.png 300w\" sizes=\"auto, (max-width: 457px) 100vw, 457px\" \/><\/p>\n<h3>Step 2: Network Settings<\/h3>\n<p>Settings Menu will be shown after clicking the \u201csettings\u201d icon. In settings options, go to \u201cNetwork\u201d.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"730\" height=\"542\" class=\"wp-image-16460\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/04\/graphical-user-interface-text-application-email.png\" alt=\"Graphical user interface, text, application, email Description automatically generated\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/04\/graphical-user-interface-text-application-email.png 730w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/04\/graphical-user-interface-text-application-email-300x223.png 300w\" sizes=\"auto, (max-width: 730px) 100vw, 730px\" \/><\/p>\n<h3>Step 3: IP Address Details<\/h3>\n<p>When you press the\u00a0\u201cgear icon\u201d\u00a0given 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 \u201cIPv4\u201d tab.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"583\" height=\"476\" class=\"wp-image-16461\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/04\/graphical-user-interface-text-application-email-1.png\" alt=\"Graphical user interface, text, application, email Description automatically generated\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/04\/graphical-user-interface-text-application-email-1.png 583w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/04\/graphical-user-interface-text-application-email-1-300x245.png 300w\" sizes=\"auto, (max-width: 583px) 100vw, 583px\" \/><\/p>\n<h3>Step 4: Changing IP Address Details<\/h3>\n<p>After selecting the IPv4 tab, select the method as \u201cmanual\u201d enter details of your own choice and then click on the \u201capply\u201d button.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"585\" height=\"473\" class=\"wp-image-16462\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/04\/graphical-user-interface-text-application-descr.png\" alt=\"Graphical user interface, text, application Description automatically generated\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/04\/graphical-user-interface-text-application-descr.png 585w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/04\/graphical-user-interface-text-application-descr-300x243.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/04\/graphical-user-interface-text-application-descr-150x120.png 150w\" sizes=\"auto, (max-width: 585px) 100vw, 585px\" \/><\/p>\n<h3>Step 5: Applying New Settings<\/h3>\n<p>After clicking on the \u201capply\u201d button, in order to apply new IP settings, turn the switch OFF and ON.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"728\" height=\"465\" class=\"wp-image-16463\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/04\/graphical-user-interface-application-email-desc.png\" alt=\"Graphical user interface, application, email Description automatically generated\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/04\/graphical-user-interface-application-email-desc.png 728w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/04\/graphical-user-interface-application-email-desc-300x192.png 300w\" sizes=\"auto, (max-width: 728px) 100vw, 728px\" \/><\/p>\n<h3>Step 6: Checking New Settings<\/h3>\n<p>In order to check whether new settings are applied or not, click on the \u201cgear icon\u201d and then go to the \u201cdetails\u201d option provided in the network settings icon and new IPv4 address settings will be obtained.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"577\" height=\"473\" class=\"wp-image-16464\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/04\/graphical-user-interface-description-automaticall.png\" alt=\"Graphical user interface Description automatically generated with medium confidence\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/04\/graphical-user-interface-description-automaticall.png 577w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/04\/graphical-user-interface-description-automaticall-300x246.png 300w\" sizes=\"auto, (max-width: 577px) 100vw, 577px\" \/><\/p>\n<h2>Conclusion<\/h2>\n<p>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.<\/p>","protected":false},"excerpt":{"rendered":"<p>Ubuntu, being a predominantly Linux operating system, has several programs to assist us in completing various tasks. It&#8217;s crucial to understand how to update your computer&#8217;s IP address&hellip;<\/p>","protected":false},"author":1,"featured_media":16479,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[97,31],"class_list":["post-16452","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ubuntu","tag-ip-address","tag-ubuntu"],"_links":{"self":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/16452","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/comments?post=16452"}],"version-history":[{"count":0,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/16452\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media\/16479"}],"wp:attachment":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media?parent=16452"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/categories?post=16452"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/tags?post=16452"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}