{"id":1756,"date":"2012-01-23T11:46:42","date_gmt":"2012-01-23T03:46:42","guid":{"rendered":"https:\/\/webhostinggeeks.com\/howto\/?p=1756"},"modified":"2023-04-28T09:49:57","modified_gmt":"2023-04-28T09:49:57","slug":"how-to-change-the-hostname-on-rhel-6-server","status":"publish","type":"post","link":"https:\/\/webhostinggeeks.com\/howto\/how-to-change-the-hostname-on-rhel-6-server\/","title":{"rendered":"How to Change the Hostname on RHEL 6\/Centos 6 Server"},"content":{"rendered":"<p>We can change the hostname of the linux operating system by using two basic methods which using the command line or graphical interface. As a reference, this article will describe how to change the hostname Red Hat Enterprise Linux 6 (RHEL 6) or CentOS 6. Please note that the server reboot is required for both options below.<\/p>\n<p><h7>Option A:<\/h7><br \/>\n1. Modify \/etc\/sysconfig\/network<\/p>\n<pre class=\"code\">[root@localhost ~]# vi \/etc\/sysconfig\/network\n<\/pre>\n<p>2. Edit to your preferred hostname :<\/p>\n<pre class=\"code\">NETWORKING=yes\nHOSTNAME=MyNewHostname.localdomain\n<\/pre>\n<p>3. Save and reboot your server.<\/p>\n<p><h7>Option B:<\/h7><br \/>\n1. Type the following command to enter GUI mode.<\/p>\n<pre class=\"code\">[root@localhost ~]# system-config-network\n<\/pre>\n<p>2. Go to &#8220;DNS Configuration&#8221;.<br \/>\n<img decoding=\"async\" class=\"alignnone lazyload\" title=\"Hostname\" data-src=\"http:\/\/4.bp.blogspot.com\/-eXX8b0tmeJc\/TxzSTjPPA_I\/AAAAAAAABfg\/A612NAgl4ec\/s1600\/1.PNG\" alt=\"Hostname\" width=\"267\" height=\"231\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 267px; --smush-placeholder-aspect-ratio: 267\/231;\" \/><\/p>\n<p>3. Modify your preferred hostname and click OK.<br \/>\n<img decoding=\"async\" class=\"alignnone lazyload\" title=\"Hostname\" data-src=\"http:\/\/4.bp.blogspot.com\/-WGMqKM09Xdo\/TxzSTgsvSmI\/AAAAAAAABfo\/B5uDsojAmyg\/s1600\/2.PNG\" alt=\"Hostname\" width=\"298\" height=\"266\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 298px; --smush-placeholder-aspect-ratio: 298\/266;\" \/><\/p>\n<p>4. Click &#8221; Save &amp; Quit&#8221;.<br \/>\n<img decoding=\"async\" class=\"alignnone lazyload\" title=\"Hostname\" data-src=\"http:\/\/4.bp.blogspot.com\/-55xQXtAflmQ\/TxzST4qSHII\/AAAAAAAABf0\/Dtf5YdRJQT0\/s1600\/3.PNG\" alt=\"Hostname\" width=\"261\" height=\"229\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 261px; --smush-placeholder-aspect-ratio: 261\/229;\" \/><\/p>\n<p>5.Reboot your server.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We can change the hostname of the linux operating system by using two basic methods which using the command line or graphical interface. As a reference, this article will describe&#8230;<\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"wds_primary_category":0,"footnotes":""},"categories":[2058],"tags":[1536,1713,1715],"class_list":["post-1756","post","type-post","status-publish","format-standard","hentry","category-rhel","tag-linux","tag-rhel","tag-rhel-6"],"_links":{"self":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/1756","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/comments?post=1756"}],"version-history":[{"count":0,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/1756\/revisions"}],"wp:attachment":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/media?parent=1756"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/categories?post=1756"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/tags?post=1756"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}