{"id":2423,"date":"2023-04-23T10:01:23","date_gmt":"2023-04-23T10:01:23","guid":{"rendered":"https:\/\/draculaservers.com\/tutorials\/?p=2423"},"modified":"2023-06-06T06:58:16","modified_gmt":"2023-06-06T06:58:16","slug":"change-hostname-in-linux","status":"publish","type":"post","link":"https:\/\/draculaservers.com\/tutorials\/change-hostname-in-linux\/","title":{"rendered":"How to Change Hostname in Linux | Temporary And Permanent"},"content":{"rendered":"<p>The hostname is an identifier every Linux Operating System has on the network. By default, the hostname is set during the installation process of the Linux Operating System. However, the user can manually set it after the installation at any time according to the requirements.<\/p>\n<p>Various scenarios can require you to change the hostname of your Linux Operating System, such as deploying a Local Server\/domain. Also, having a more meaningful hostname allows your PC to be easily accessed instead of using its IP Address.<\/p>\n<p>Whatever the case is. This guide will teach you all the different ways that you can use to change the hostname of your Linux Operating System.<\/p>\n<p>But first&#8230;<\/p>\n<h2 id=\"how-to-check-the-hostname-in-linux\">How to Check the Hostname in Linux?<\/h2>\n<p>Before learning how to change the hostname, you should be aware of the method of checking the current hostname. You can easily check the hostname of your machine by running the following command in the terminal:<\/p>\n<pre>hostname<\/pre>\n<p>This will show the following output:<\/p>\n<p><a href=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/1-4.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2424\" src=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/1-4.png\" alt=\"How to Change Hostname in Linux | Temporary And Permanent\" width=\"983\" height=\"183\" srcset=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/1-4.png 983w, https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/1-4-300x56.png 300w, https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/1-4-768x143.png 768w\" sizes=\"auto, (max-width: 983px) 100vw, 983px\" \/><\/a><\/p>\n<p>As you can see from the image, the current hostname is set to \u201c<strong>linux<\/strong>.\u201d<\/p>\n<p><strong>Note: <\/strong>Alternatively, you can use the command \u201c<strong>hostnamectl<\/strong>\u201d to get more information.<\/p>\n<h2 id=\"method-1-change-hostname-with-network-manager\">Method 1: Change Hostname With Network Manager<\/h2>\n<p>The Network Manager Text User Interface is a setup wizard that lets users manage their network settings. This means that it allows the users to change their hostname as well. This is a great tool for beginners in the Linux Operating System. If the nmtui utility is not installed on your Linux operating system, then you will first install it using the following commands:<strong>\u00a0<\/strong><\/p>\n<p><strong>For <a href=\"https:\/\/www.centos.org\/\" target=\"_blank\" rel=\"noopener\">CentOS\/RHEL<\/a>:<\/strong><\/p>\n<pre>sudo yum install NetworkManager-tui<\/pre>\n<p><strong>For <a href=\"https:\/\/ubuntu.com\/\" target=\"_blank\" rel=\"noopener\">Ubuntu\/Debian<\/a>:<\/strong><\/p>\n<pre>sudo apt install NetworkManager-tui<\/pre>\n<p>After that nmtui has been installed, open a terminal and type the following command:<\/p>\n<pre>sudo nmtui<\/pre>\n<p>Type in the password for the root user, and the terminal will display the following textual menu:<\/p>\n<p><a href=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/2-4.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2425\" src=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/2-4.png\" alt=\"How to Change Hostname in Linux | Temporary And Permanent\" width=\"971\" height=\"670\" srcset=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/2-4.png 971w, https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/2-4-300x207.png 300w, https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/2-4-768x530.png 768w\" sizes=\"auto, (max-width: 971px) 100vw, 971px\" \/><\/a><\/p>\n<p>Use the keyboard arrow keys to head to the third option, \u201c<strong>Set system hostname,<\/strong>\u201d and press enter. Doing this will open a new pop-up window asking you about the new hostname:<\/p>\n<p><a href=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/3-4.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2426\" src=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/3-4.png\" alt=\"How to Change Hostname in Linux | Temporary And Permanent\" width=\"803\" height=\"448\" srcset=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/3-4.png 803w, https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/3-4-300x167.png 300w, https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/3-4-768x428.png 768w\" sizes=\"auto, (max-width: 803px) 100vw, 803px\" \/><\/a><\/p>\n<p>Type the hostname that you want and press the Enter key:<\/p>\n<p><a href=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/4-4.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2427\" src=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/4-4.png\" alt=\"How to Change Hostname in Linux | Temporary And Permanent\" width=\"785\" height=\"447\" srcset=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/4-4.png 785w, https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/4-4-300x171.png 300w, https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/4-4-768x437.png 768w\" sizes=\"auto, (max-width: 785px) 100vw, 785px\" \/><\/a><\/p>\n<p>After that, exit the Network Manager UI and type the following command in the terminal:<\/p>\n<pre>hostnamectl<\/pre>\n<p>This will show you the hostname of your machine after the change has been made:<\/p>\n<p><a href=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/5-4.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2428\" src=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/5-4.png\" alt=\"How to Change Hostname in Linux | Temporary And Permanent\" width=\"969\" height=\"457\" srcset=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/5-4.png 969w, https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/5-4-300x141.png 300w, https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/5-4-768x362.png 768w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/><\/a><\/p>\n<p>You have successfully changed your hostname. However, this change is temporary and will reset after your machine has been rebooted.<\/p>\n<h2 id=\"method-2-edit-the-hosts-configuration-files\">Method 2: Edit the Hosts Configuration Files<\/h2>\n<p>If you want to change the hostname permanently, you&#8217;ll need to change your system configuration files. The configuration files are \u201chosts\u201d and \u201chostname.\u201d Start by opening the hostname file using the following command:<\/p>\n<pre>sudo nano \/etc\/hostname<\/pre>\n<p>Running this will show the hostname file\u2019s content:<\/p>\n<p><a href=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/6-4.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2429\" src=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/6-4.png\" alt=\"How to Change Hostname in Linux | Temporary And Permanent\" width=\"980\" height=\"229\" srcset=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/6-4.png 980w, https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/6-4-300x70.png 300w, https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/6-4-768x179.png 768w\" sizes=\"auto, (max-width: 980px) 100vw, 980px\" \/><\/a><\/p>\n<p>Replace the current hostname with the new hostname:<\/p>\n<p><a href=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/7-4.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2430\" src=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/7-4.png\" alt=\"How to Change Hostname in Linux | Temporary And Permanent\" width=\"984\" height=\"240\" srcset=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/7-4.png 984w, https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/7-4-300x73.png 300w, https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/7-4-768x187.png 768w\" sizes=\"auto, (max-width: 984px) 100vw, 984px\" \/><\/a><\/p>\n<p>After that, simply save and close the file using the \u201c<strong>CTRL+O<\/strong>\u201d followed up by \u201c<strong>CTRL+X.<\/strong>\u201d You&#8217;ll also need to update the<strong> \/etc\/hosts<\/strong> file to reflect the new hostname. Open the file with the following command:<\/p>\n<pre>sudo nano \/etc\/hosts<\/pre>\n<p>Look for the line that starts with <strong>127.0.0.1<\/strong> and has the old hostname next to it:<\/p>\n<p><a href=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/8-4.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2431\" src=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/8-4.png\" alt=\"How to Change Hostname in Linux | Temporary And Permanent\" width=\"972\" height=\"315\" srcset=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/8-4.png 972w, https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/8-4-300x97.png 300w, https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/8-4-768x249.png 768w\" sizes=\"auto, (max-width: 972px) 100vw, 972px\" \/><\/a><\/p>\n<p>Replace the old hostname with the new one and save the file.<\/p>\n<p><a href=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/9-3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2432\" src=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/9-3.png\" alt=\"How to Change Hostname in Linux | Temporary And Permanent\" width=\"972\" height=\"252\" srcset=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/9-3.png 972w, https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/9-3-300x78.png 300w, https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/9-3-768x199.png 768w\" sizes=\"auto, (max-width: 972px) 100vw, 972px\" \/><\/a><\/p>\n<p>Finally, restart your machine to apply your permanent changes. After the restart, verify the hostname using the <strong>hostnamectl<\/strong> command:<\/p>\n<p><a href=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/10-3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2433\" src=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/10-3.png\" alt=\"How to Change Hostname in Linux | Temporary And Permanent\" width=\"971\" height=\"391\" srcset=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/10-3.png 971w, https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/10-3-300x121.png 300w, https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/10-3-768x309.png 768w\" sizes=\"auto, (max-width: 971px) 100vw, 971px\" \/><\/a><\/p>\n<p>You have successfully changed your Hostname permanently.<\/p>\n<h2 id=\"method-3-using-the-hostname-command\">Method 3: Using the hostname Command<\/h2>\n<p>You can temporarily change your machine\u2019s hostname by simply using the hostname command. The syntax of using this command is defined as:<\/p>\n<pre>sudo hostname &lt;new_Hostname_here&gt;<\/pre>\n<p>Let\u2019s change the hostname to \u201cDSHome\u201d by using the following hostname command in the terminal:<\/p>\n<pre>sudo hostname DSHome<\/pre>\n<p>After running this command, use the <strong>hostname <\/strong>command to verify the temporary change:<\/p>\n<p><a href=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/11-3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2434\" src=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/11-3.png\" alt=\"How to Change Hostname in Linux | Temporary And Permanent\" width=\"971\" height=\"187\" srcset=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/11-3.png 971w, https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/11-3-300x58.png 300w, https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/11-3-768x148.png 768w\" sizes=\"auto, (max-width: 971px) 100vw, 971px\" \/><\/a><\/p>\n<p>You have successfully changed your hostname temporarily.<\/p>\n<h2 id=\"method-4-using-the-hostnamectl-command\">Method 4: Using the hostnamectl Command<\/h2>\n<p>Just like the <strong>hostname <\/strong>command, you can use the <strong>hostnamectl <\/strong>command to change your hostname. To do this, simply follow the given syntax:<\/p>\n<pre>sudo hostnamectl set-hostname &lt;new_Hostname_Here&gt;<\/pre>\n<p>Let\u2019s change the hostname to \u201cDSServer\u201d by using the following <strong>hostnamectl<\/strong> command:<\/p>\n<pre>sudo hostnamectl set-hostname DSServer<\/pre>\n<p>After that, verify the change using the <strong>hostname<\/strong> command:<\/p>\n<p><a href=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/12-3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2435\" src=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/12-3.png\" alt=\"How to Change Hostname in Linux | Temporary And Permanent\" width=\"975\" height=\"182\" srcset=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/12-3.png 975w, https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/12-3-300x56.png 300w, https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/12-3-768x143.png 768w\" sizes=\"auto, (max-width: 975px) 100vw, 975px\" \/><\/a><\/p>\n<p>You have successfully changed the hostname using the <strong>hostnamectl<\/strong> command.<\/p>\n<h2 id=\"method-5-using-the-gui\">Method 5: Using the GUI<\/h2>\n<p>Lastly, you can always use GNOME to change your hostname. For this, simply open up \u201c<strong>applications<\/strong>\u201d and search for \u201c<strong>settings<\/strong>\u201d:<\/p>\n<p><a href=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/13-3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2436\" src=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/13-3.png\" alt=\"How to Change Hostname in Linux | Temporary And Permanent\" width=\"1238\" height=\"540\" srcset=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/13-3.png 1238w, https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/13-3-300x131.png 300w, https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/13-3-1024x447.png 1024w, https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/13-3-768x335.png 768w\" sizes=\"auto, (max-width: 1238px) 100vw, 1238px\" \/><\/a><\/p>\n<p>In Settings, scroll the left-side navigation bar to the very bottom and click on the \u201c<strong>About<\/strong>\u201d tab:<\/p>\n<p><a href=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/14-2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2437\" src=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/14-2.png\" alt=\"How to Change Hostname in Linux | Temporary And Permanent\" width=\"988\" height=\"321\" srcset=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/14-2.png 988w, https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/14-2-300x97.png 300w, https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/14-2-768x250.png 768w\" sizes=\"auto, (max-width: 988px) 100vw, 988px\" \/><\/a><\/p>\n<p>After that, click on the \u201c<strong>Device name<\/strong>\u201d bar:<\/p>\n<p><a href=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/xx.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2438\" src=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/xx.png\" alt=\"How to Change Hostname in Linux | Temporary And Permanent\" width=\"978\" height=\"467\" srcset=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/xx.png 978w, https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/xx-300x143.png 300w, https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/xx-768x367.png 768w\" sizes=\"auto, (max-width: 978px) 100vw, 978px\" \/><\/a><\/p>\n<p>After that, a pop window will open up. Type in the new hostname in this pop-up window and click on the \u201c<strong>Rename<\/strong>\u201d button:<a href=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/15-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2439\" src=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/15-1.png\" alt=\"How to Change Hostname in Linux | Temporary And Permanent\" width=\"413\" height=\"242\" srcset=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/15-1.png 413w, https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/15-1-300x176.png 300w\" sizes=\"auto, (max-width: 413px) 100vw, 413px\" \/><\/a><\/p>\n<p>You can verify it using the <strong>hostname <\/strong>command:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2441\" src=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/16-2.png\" alt=\"How to Change Hostname in Linux | Temporary And Permanent\" width=\"975\" height=\"166\" srcset=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/16-2.png 975w, https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/16-2-300x51.png 300w, https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/16-2-768x131.png 768w\" sizes=\"auto, (max-width: 975px) 100vw, 975px\" \/><\/p>\n<p>Congratulations! You have successfully changed your hostname using the GUI. That\u2019s it for this guide.<\/p>\n<h2 id=\"dracula-vps-hosting-service\">Dracula VPS Hosting Service<\/h2>\n<p><a href=\"http:\/\/draculaservers.com\"><span style=\"font-weight: 400;\">Dracula Servers<\/span><\/a><span style=\"font-weight: 400;\"> offers high-performance server hosting at entry-level prices. The plans include Linux VPS, Sneaker Servers, Dedicated Servers &amp; turnkey solutions. If you&#8217;re looking for quality self-managed servers with high amounts of RAM and storage, look no further.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Check the plans for yourself by clicking <\/span><a href=\"https:\/\/draculaservers.com\/#pick-plan\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">Here<\/span><\/a><span style=\"font-weight: 400;\">!<\/span><\/p>\n<h2 id=\"wrap-up\">Wrap up<\/h2>\n<p>The hostname is a crucial part of a Linux machine connected to a network. The user can change the hostname of the Linux machine using any of the methods mentioned in this guide. Check out other Linux Tutorials <a href=\"https:\/\/draculaservers.com\/tutorials\/\" target=\"_blank\" rel=\"noopener\">here<\/a>!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The hostname is an identifier every Linux Operating System has on the network. By default, the hostname is set during the installation process of the Linux Operating System. However, the user can manually set it after the installation at any time according to the requirements. Various scenarios can require you to change the hostname of [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":2442,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[72,67,2],"tags":[118,102,119,34],"class_list":["post-2423","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-centos","category-debian","category-linux-basics","tag-hostname","tag-linux","tag-linux-basics","tag-ubuntu"],"blocksy_meta":{"styles_descriptor":{"styles":{"desktop":"","tablet":"","mobile":""},"google_fonts":[],"version":6}},"featured_image_urls_v2":{"full":["https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/hostname.png",1280,720,false],"thumbnail":["https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/hostname-150x150.png",150,150,true],"medium":["https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/hostname-300x169.png",300,169,true],"medium_large":["https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/hostname-768x432.png",768,432,true],"large":["https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/hostname-1024x576.png",1024,576,true],"1536x1536":["https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/hostname.png",1280,720,false],"2048x2048":["https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/hostname.png",1280,720,false],"pk-small":["https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/hostname-80x80.png",80,80,true],"pk-thumbnail":["https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/hostname-300x225.png",300,225,true]},"post_excerpt_stackable_v2":"<p>The hostname is an identifier every Linux Operating System has on the network. By default, the hostname is set during the installation process of the Linux Operating System. However, the user can manually set it after the installation at any time according to the requirements. Various scenarios can require you to change the hostname of your Linux Operating System, such as deploying a Local Server\/domain. Also, having a more meaningful hostname allows your PC to be easily accessed instead of using its IP Address. Whatever the case is. This guide will teach you all the different ways that you can&hellip;<\/p>\n","category_list_v2":"<a href=\"https:\/\/draculaservers.com\/tutorials\/category\/centos\/\" rel=\"category tag\">CentOS<\/a>, <a href=\"https:\/\/draculaservers.com\/tutorials\/category\/debian\/\" rel=\"category tag\">Debian<\/a>, <a href=\"https:\/\/draculaservers.com\/tutorials\/category\/linux-basics\/\" rel=\"category tag\">Linux Basics<\/a>","author_info_v2":{"name":"Abdul Mannan","url":"https:\/\/draculaservers.com\/tutorials\/author\/abdul-mannan-tbgmail-com\/"},"comments_num_v2":"1 comment","yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Change Hostname in Linux | Temporary And Permanent - Dracula Servers Tutorials<\/title>\n<meta name=\"description\" content=\"You can change hostname using the nmtui tool, the hostname and hostnamectl commands, or the GUI Method explain in this Guide.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/draculaservers.com\/tutorials\/change-hostname-in-linux\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Change Hostname in Linux | Temporary And Permanent - Dracula Servers Tutorials\" \/>\n<meta property=\"og:description\" content=\"You can change hostname using the nmtui tool, the hostname and hostnamectl commands, or the GUI Method explain in this Guide.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/draculaservers.com\/tutorials\/change-hostname-in-linux\/\" \/>\n<meta property=\"og:site_name\" content=\"Dracula Servers Tutorials\" \/>\n<meta property=\"article:published_time\" content=\"2023-04-23T10:01:23+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-06-06T06:58:16+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/hostname.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1280\" \/>\n\t<meta property=\"og:image:height\" content=\"720\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Abdul Mannan\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Abdul Mannan\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/change-hostname-in-linux\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/change-hostname-in-linux\\\/\"},\"author\":{\"name\":\"Abdul Mannan\",\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/ac89d0281f4fb596bfaa0bc1e746c8a6\"},\"headline\":\"How to Change Hostname in Linux | Temporary And Permanent\",\"datePublished\":\"2023-04-23T10:01:23+00:00\",\"dateModified\":\"2023-06-06T06:58:16+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/change-hostname-in-linux\\\/\"},\"wordCount\":854,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/change-hostname-in-linux\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2023\\\/04\\\/hostname.png\",\"keywords\":[\"Hostname\",\"linux\",\"Linux Basics\",\"Ubuntu\"],\"articleSection\":[\"CentOS\",\"Debian\",\"Linux Basics\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/change-hostname-in-linux\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/change-hostname-in-linux\\\/\",\"url\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/change-hostname-in-linux\\\/\",\"name\":\"How to Change Hostname in Linux | Temporary And Permanent - Dracula Servers Tutorials\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/change-hostname-in-linux\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/change-hostname-in-linux\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2023\\\/04\\\/hostname.png\",\"datePublished\":\"2023-04-23T10:01:23+00:00\",\"dateModified\":\"2023-06-06T06:58:16+00:00\",\"description\":\"You can change hostname using the nmtui tool, the hostname and hostnamectl commands, or the GUI Method explain in this Guide.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/change-hostname-in-linux\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/change-hostname-in-linux\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/change-hostname-in-linux\\\/#primaryimage\",\"url\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2023\\\/04\\\/hostname.png\",\"contentUrl\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2023\\\/04\\\/hostname.png\",\"width\":1280,\"height\":720},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/change-hostname-in-linux\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Change Hostname in Linux | Temporary And Permanent\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/#website\",\"url\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/\",\"name\":\"Dracula Servers Tutorials\",\"description\":\"Dedicated Servers\",\"publisher\":{\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/#organization\",\"name\":\"Dracula Servers\",\"url\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2016\\\/06\\\/dracula_full_logo_smaller.png\",\"contentUrl\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2016\\\/06\\\/dracula_full_logo_smaller.png\",\"width\":1625,\"height\":200,\"caption\":\"Dracula Servers\"},\"image\":{\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/draculaservers.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/ac89d0281f4fb596bfaa0bc1e746c8a6\",\"name\":\"Abdul Mannan\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/2809442d44177cab4f90e1d9b3295560462063881ca1374b6d597d8f0b48fc21?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/2809442d44177cab4f90e1d9b3295560462063881ca1374b6d597d8f0b48fc21?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/2809442d44177cab4f90e1d9b3295560462063881ca1374b6d597d8f0b48fc21?s=96&d=mm&r=g\",\"caption\":\"Abdul Mannan\"},\"description\":\"An individual trying to decipher the enigmas of technology by the sheer driving force of curiosity. Interested in learning new skills and being better at those skills than the lot.\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Change Hostname in Linux | Temporary And Permanent - Dracula Servers Tutorials","description":"You can change hostname using the nmtui tool, the hostname and hostnamectl commands, or the GUI Method explain in this Guide.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/draculaservers.com\/tutorials\/change-hostname-in-linux\/","og_locale":"en_US","og_type":"article","og_title":"How to Change Hostname in Linux | Temporary And Permanent - Dracula Servers Tutorials","og_description":"You can change hostname using the nmtui tool, the hostname and hostnamectl commands, or the GUI Method explain in this Guide.","og_url":"https:\/\/draculaservers.com\/tutorials\/change-hostname-in-linux\/","og_site_name":"Dracula Servers Tutorials","article_published_time":"2023-04-23T10:01:23+00:00","article_modified_time":"2023-06-06T06:58:16+00:00","og_image":[{"width":1280,"height":720,"url":"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/hostname.png","type":"image\/png"}],"author":"Abdul Mannan","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Abdul Mannan","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/draculaservers.com\/tutorials\/change-hostname-in-linux\/#article","isPartOf":{"@id":"https:\/\/draculaservers.com\/tutorials\/change-hostname-in-linux\/"},"author":{"name":"Abdul Mannan","@id":"https:\/\/draculaservers.com\/tutorials\/#\/schema\/person\/ac89d0281f4fb596bfaa0bc1e746c8a6"},"headline":"How to Change Hostname in Linux | Temporary And Permanent","datePublished":"2023-04-23T10:01:23+00:00","dateModified":"2023-06-06T06:58:16+00:00","mainEntityOfPage":{"@id":"https:\/\/draculaservers.com\/tutorials\/change-hostname-in-linux\/"},"wordCount":854,"commentCount":1,"publisher":{"@id":"https:\/\/draculaservers.com\/tutorials\/#organization"},"image":{"@id":"https:\/\/draculaservers.com\/tutorials\/change-hostname-in-linux\/#primaryimage"},"thumbnailUrl":"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/hostname.png","keywords":["Hostname","linux","Linux Basics","Ubuntu"],"articleSection":["CentOS","Debian","Linux Basics"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/draculaservers.com\/tutorials\/change-hostname-in-linux\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/draculaservers.com\/tutorials\/change-hostname-in-linux\/","url":"https:\/\/draculaservers.com\/tutorials\/change-hostname-in-linux\/","name":"How to Change Hostname in Linux | Temporary And Permanent - Dracula Servers Tutorials","isPartOf":{"@id":"https:\/\/draculaservers.com\/tutorials\/#website"},"primaryImageOfPage":{"@id":"https:\/\/draculaservers.com\/tutorials\/change-hostname-in-linux\/#primaryimage"},"image":{"@id":"https:\/\/draculaservers.com\/tutorials\/change-hostname-in-linux\/#primaryimage"},"thumbnailUrl":"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/hostname.png","datePublished":"2023-04-23T10:01:23+00:00","dateModified":"2023-06-06T06:58:16+00:00","description":"You can change hostname using the nmtui tool, the hostname and hostnamectl commands, or the GUI Method explain in this Guide.","breadcrumb":{"@id":"https:\/\/draculaservers.com\/tutorials\/change-hostname-in-linux\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/draculaservers.com\/tutorials\/change-hostname-in-linux\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/draculaservers.com\/tutorials\/change-hostname-in-linux\/#primaryimage","url":"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/hostname.png","contentUrl":"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2023\/04\/hostname.png","width":1280,"height":720},{"@type":"BreadcrumbList","@id":"https:\/\/draculaservers.com\/tutorials\/change-hostname-in-linux\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/draculaservers.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"How to Change Hostname in Linux | Temporary And Permanent"}]},{"@type":"WebSite","@id":"https:\/\/draculaservers.com\/tutorials\/#website","url":"https:\/\/draculaservers.com\/tutorials\/","name":"Dracula Servers Tutorials","description":"Dedicated Servers","publisher":{"@id":"https:\/\/draculaservers.com\/tutorials\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/draculaservers.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/draculaservers.com\/tutorials\/#organization","name":"Dracula Servers","url":"https:\/\/draculaservers.com\/tutorials\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/draculaservers.com\/tutorials\/#\/schema\/logo\/image\/","url":"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2016\/06\/dracula_full_logo_smaller.png","contentUrl":"https:\/\/draculaservers.com\/tutorials\/wp-content\/uploads\/2016\/06\/dracula_full_logo_smaller.png","width":1625,"height":200,"caption":"Dracula Servers"},"image":{"@id":"https:\/\/draculaservers.com\/tutorials\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/draculaservers.com\/tutorials\/#\/schema\/person\/ac89d0281f4fb596bfaa0bc1e746c8a6","name":"Abdul Mannan","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/2809442d44177cab4f90e1d9b3295560462063881ca1374b6d597d8f0b48fc21?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/2809442d44177cab4f90e1d9b3295560462063881ca1374b6d597d8f0b48fc21?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/2809442d44177cab4f90e1d9b3295560462063881ca1374b6d597d8f0b48fc21?s=96&d=mm&r=g","caption":"Abdul Mannan"},"description":"An individual trying to decipher the enigmas of technology by the sheer driving force of curiosity. Interested in learning new skills and being better at those skills than the lot."}]}},"_links":{"self":[{"href":"https:\/\/draculaservers.com\/tutorials\/wp-json\/wp\/v2\/posts\/2423","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/draculaservers.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/draculaservers.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/draculaservers.com\/tutorials\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/draculaservers.com\/tutorials\/wp-json\/wp\/v2\/comments?post=2423"}],"version-history":[{"count":2,"href":"https:\/\/draculaservers.com\/tutorials\/wp-json\/wp\/v2\/posts\/2423\/revisions"}],"predecessor-version":[{"id":2532,"href":"https:\/\/draculaservers.com\/tutorials\/wp-json\/wp\/v2\/posts\/2423\/revisions\/2532"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/draculaservers.com\/tutorials\/wp-json\/wp\/v2\/media\/2442"}],"wp:attachment":[{"href":"https:\/\/draculaservers.com\/tutorials\/wp-json\/wp\/v2\/media?parent=2423"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/draculaservers.com\/tutorials\/wp-json\/wp\/v2\/categories?post=2423"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/draculaservers.com\/tutorials\/wp-json\/wp\/v2\/tags?post=2423"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}