{"id":871,"date":"2013-05-09T05:12:05","date_gmt":"2013-05-09T05:12:05","guid":{"rendered":"http:\/\/www.milesweb.com\/hosting-faqs\/?p=871"},"modified":"2022-02-22T17:44:24","modified_gmt":"2022-02-22T12:14:24","slug":"how-to-change-servers-hostname-on-linux-centos","status":"publish","type":"post","link":"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-change-servers-hostname-on-linux-centos\/","title":{"rendered":"How to change server&#8217;s hostname on linux CentOS?"},"content":{"rendered":"<p>Hostname is to display the current host, domain or node name of the system.\u00a0These names are used by many of the networking programs to identify the machine. The domain name is also used by NIS\/YP. It should be a FQDN (Fully Qualified Domain Name).<\/p>\n<p>You can change the server&#8217;s hostname on your <strong><a title=\"linux VPS\" href=\"https:\/\/www.milesweb.in\/hosting\/vps-hosting\/linux-vps-hosting\" target=\"_blank\" rel=\"noopener noreferrer\">linux VPS<\/a><\/strong> OR <strong><a title=\"dedicated servers\" href=\"https:\/\/www.milesweb.in\/hosting\/dedicated-servers\/\" target=\"_blank\" rel=\"noopener noreferrer\">dedicated servers<\/a><\/strong> by following the steps below.<\/p>\n<p>Login to your server via SSH &amp; set a hostname with command &#8220;hostname&#8221;<\/p>\n<p><strong> # hostname server.domain.com<\/strong><\/p>\n<p>Open the file <strong>\/etc\/sysconfig\/network<\/strong> and set the hostname in this file. Save the file and quit.<\/p>\n<p><strong>NETWORKING=&#8221;yes&#8221;<br \/>\nNETWORKING_IPV6=&#8221;yes&#8221;<br \/>\nHOSTNAME=&#8221;server.domain.com&#8221;<br \/>\nDOMAINNAME=domain.com<\/strong><\/p>\n<p>Doing this, hostname for your server is set.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hostname is to display the current host, domain or node name of the system.\u00a0These names are used by many of the networking programs to identify the machine. The domain name is also used by NIS\/YP. It should be a FQDN (Fully Qualified Domain Name). You can change the server&#8217;s hostname on your linux VPS OR [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[41],"tags":[],"class_list":["post-871","post","type-post","status-publish","format-standard","placeholder-for-hentry","category-howtos"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to change server&#039;s hostname on linux CentOS?<\/title>\n<meta name=\"description\" content=\"Hostname is to display the current host, domain or node name of the system. These names are used by many of the networking programs to identify the machine.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-change-servers-hostname-on-linux-centos\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to change server&#039;s hostname on linux CentOS?\" \/>\n<meta property=\"og:description\" content=\"Hostname is to display the current host, domain or node name of the system. These names are used by many of the networking programs to identify the machine.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-change-servers-hostname-on-linux-centos\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Hosting FAQs by MilesWeb\" \/>\n<meta property=\"article:published_time\" content=\"2013-05-09T05:12:05+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-02-22T12:14:24+00:00\" \/>\n<meta name=\"author\" content=\"Admin\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-change-servers-hostname-on-linux-centos\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-change-servers-hostname-on-linux-centos\/\"},\"author\":{\"name\":\"Admin\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/90143c7d8df4b4de36b3dbb0bb272f69\"},\"headline\":\"How to change server&#8217;s hostname on linux CentOS?\",\"datePublished\":\"2013-05-09T05:12:05+00:00\",\"dateModified\":\"2022-02-22T12:14:24+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-change-servers-hostname-on-linux-centos\/\"},\"wordCount\":129,\"commentCount\":0,\"articleSection\":[\"How-Tos\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-change-servers-hostname-on-linux-centos\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-change-servers-hostname-on-linux-centos\/\",\"url\":\"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-change-servers-hostname-on-linux-centos\/\",\"name\":\"How to change server's hostname on linux CentOS?\",\"isPartOf\":{\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/#website\"},\"datePublished\":\"2013-05-09T05:12:05+00:00\",\"dateModified\":\"2022-02-22T12:14:24+00:00\",\"author\":{\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/90143c7d8df4b4de36b3dbb0bb272f69\"},\"description\":\"Hostname is to display the current host, domain or node name of the system. These names are used by many of the networking programs to identify the machine.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-change-servers-hostname-on-linux-centos\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-change-servers-hostname-on-linux-centos\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-change-servers-hostname-on-linux-centos\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.milesweb.in\/hosting-faqs\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to change server&#8217;s hostname on linux CentOS?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/#website\",\"url\":\"https:\/\/www.milesweb.in\/hosting-faqs\/\",\"name\":\"Web Hosting FAQs by MilesWeb\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.milesweb.in\/hosting-faqs\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/90143c7d8df4b4de36b3dbb0bb272f69\",\"name\":\"Admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2020\/02\/MilesWeb-Logo-150x150.png\",\"contentUrl\":\"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2020\/02\/MilesWeb-Logo-150x150.png\",\"caption\":\"Admin\"},\"description\":\"With over 10+ years of experience in the web hosting industry, I have achieved extensive exposure to result-oriented methodologies. And expertise in different domains like Datacentre Services, Cloud computing technology, Web hosting industry and many more.\",\"url\":\"https:\/\/www.milesweb.in\/hosting-faqs\/author\/admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to change server's hostname on linux CentOS?","description":"Hostname is to display the current host, domain or node name of the system. These names are used by many of the networking programs to identify the machine.","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:\/\/www.milesweb.in\/hosting-faqs\/how-to-change-servers-hostname-on-linux-centos\/","og_locale":"en_US","og_type":"article","og_title":"How to change server's hostname on linux CentOS?","og_description":"Hostname is to display the current host, domain or node name of the system. These names are used by many of the networking programs to identify the machine.","og_url":"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-change-servers-hostname-on-linux-centos\/","og_site_name":"Web Hosting FAQs by MilesWeb","article_published_time":"2013-05-09T05:12:05+00:00","article_modified_time":"2022-02-22T12:14:24+00:00","author":"Admin","twitter_misc":{"Written by":"Admin","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-change-servers-hostname-on-linux-centos\/#article","isPartOf":{"@id":"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-change-servers-hostname-on-linux-centos\/"},"author":{"name":"Admin","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/90143c7d8df4b4de36b3dbb0bb272f69"},"headline":"How to change server&#8217;s hostname on linux CentOS?","datePublished":"2013-05-09T05:12:05+00:00","dateModified":"2022-02-22T12:14:24+00:00","mainEntityOfPage":{"@id":"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-change-servers-hostname-on-linux-centos\/"},"wordCount":129,"commentCount":0,"articleSection":["How-Tos"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.milesweb.in\/hosting-faqs\/how-to-change-servers-hostname-on-linux-centos\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-change-servers-hostname-on-linux-centos\/","url":"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-change-servers-hostname-on-linux-centos\/","name":"How to change server's hostname on linux CentOS?","isPartOf":{"@id":"https:\/\/www.milesweb.in\/hosting-faqs\/#website"},"datePublished":"2013-05-09T05:12:05+00:00","dateModified":"2022-02-22T12:14:24+00:00","author":{"@id":"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/90143c7d8df4b4de36b3dbb0bb272f69"},"description":"Hostname is to display the current host, domain or node name of the system. These names are used by many of the networking programs to identify the machine.","breadcrumb":{"@id":"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-change-servers-hostname-on-linux-centos\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.milesweb.in\/hosting-faqs\/how-to-change-servers-hostname-on-linux-centos\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/how-to-change-servers-hostname-on-linux-centos\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.milesweb.in\/hosting-faqs\/"},{"@type":"ListItem","position":2,"name":"How to change server&#8217;s hostname on linux CentOS?"}]},{"@type":"WebSite","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/#website","url":"https:\/\/www.milesweb.in\/hosting-faqs\/","name":"Web Hosting FAQs by MilesWeb","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.milesweb.in\/hosting-faqs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/90143c7d8df4b4de36b3dbb0bb272f69","name":"Admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/image\/","url":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2020\/02\/MilesWeb-Logo-150x150.png","contentUrl":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2020\/02\/MilesWeb-Logo-150x150.png","caption":"Admin"},"description":"With over 10+ years of experience in the web hosting industry, I have achieved extensive exposure to result-oriented methodologies. And expertise in different domains like Datacentre Services, Cloud computing technology, Web hosting industry and many more.","url":"https:\/\/www.milesweb.in\/hosting-faqs\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/posts\/871","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/comments?post=871"}],"version-history":[{"count":10,"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/posts\/871\/revisions"}],"predecessor-version":[{"id":16586,"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/posts\/871\/revisions\/16586"}],"wp:attachment":[{"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/media?parent=871"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/categories?post=871"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/tags?post=871"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}