{"id":41,"date":"2007-11-21T16:41:57","date_gmt":"2007-11-21T14:41:57","guid":{"rendered":"https:\/\/www.networknet.nl\/apps\/wp\/archives\/41"},"modified":"2011-07-01T07:53:24","modified_gmt":"2011-07-01T05:53:24","slug":"centos-how-to-change-hostname","status":"publish","type":"post","link":"https:\/\/www.networknet.nl\/apps\/wp\/archives\/41","title":{"rendered":"CentOS how to change hostname?"},"content":{"rendered":"<div class=\"messageBox info icon\"><span>CentOS is an Enterprise Linux distribution based on the\u00a0freely available sources from Red Hat Enterprise Linux. Each CentOS version is supported for 7 years (by means of security updates). A new CentOS version is released every 2 years and each CentOS version is periodically updated (roughly every 6 months) to support newer hardware. This results in a secure, low-maintenance, reliable, predictable and reproducible Linux environment.<\/span><\/div>\n<p>I\u00a0personally\u00a0prefer to install CentOS as my linux distribution. Today I needed to change the <strong>hostname<\/strong> of my virtual guest machine running <strong>CentOS<\/strong>.<\/p>\n<h3>How to change hostname of a CentOS system?<\/h3>\n<p>There are several ways to do that but I am using the old way. VI is my friend and still working. I am using a remote SSH session to one of my virtual machines but you can perform same steps from the console.<\/p>\n<\/p>\n<ul class=\"icon-list \" style=\"margin-left: 10px;\">\n<li><div class=\"icon16 iconMedia play\"><\/div>Login with putty.exe<\/li>\n<li><div class=\"icon16 iconMedia play\"><\/div>Goto \/etc\/sysconfig\/<\/li>\n<li><div class=\"icon16 iconMedia play\"><\/div>Type vi network<\/li>\n<li><div class=\"icon16 iconMedia play\"><\/div>Press i on the keyboard and change the HOSTNAME to your preferred servername<\/li>\n<li><div class=\"icon16 iconMedia play\"><\/div>Press ESC on the keybord<\/li>\n<li><div class=\"icon16 iconMedia play\"><\/div>Save the configuration by :wq!<\/li>\n<li><div class=\"icon16 iconMedia play\"><\/div>Log off or reboot<\/li>\n<\/ul>\n<p>\n<a href=\"https:\/\/www.networknet.nl\/apps\/wp\/wp-content\/uploads\/2007-11-21_154313.png\" class=\"styled-image popup\" title=\"CentOS network sysconfig file\" ><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.networknet.nl\/apps\/wp\/wp-content\/uploads\/2007-11-21_154313-250x200.png\" width=\"250\" height=\"200\" alt=\"CentOS network sysconfig file\" \/><\/a>\n<p>That&#8217;s all!<\/p>\n<h3>Related<\/h3>\n<ul>\n<li><a href=\"https:\/\/www.networknet.nl\/apps\/wp\/archives\/43\">CentOS how to install VMWare tools?<\/a><\/li>\n<\/ul>\n<h2><a title=\"Permalink to CentOS how to install VMWare tools?\" rel=\"bookmark\" href=\"https:\/\/www.networknet.nl\/apps\/wp\/archives\/43\"><\/a><\/h2>\n","protected":false},"excerpt":{"rendered":"<p>I\u00a0personally\u00a0prefer to install CentOS as my linux distribution. Today I needed to change the hostname of my virtual guest machine running CentOS. How to change hostname of a CentOS system? There are several ways to do that but I am using the old way. VI is my friend and still working. I am using a remote SSH session to one of my virtual machines but you can perform same steps from the console. That&#8217;s all! Related CentOS how to install VMWare tools?<\/p>\n","protected":false},"author":1,"featured_media":1762,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21],"tags":[778,574,641,147],"class_list":["post-41","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-centos","tag-centos","tag-change","tag-hostname","tag-howto"],"_links":{"self":[{"href":"https:\/\/www.networknet.nl\/apps\/wp\/wp-json\/wp\/v2\/posts\/41","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.networknet.nl\/apps\/wp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.networknet.nl\/apps\/wp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.networknet.nl\/apps\/wp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.networknet.nl\/apps\/wp\/wp-json\/wp\/v2\/comments?post=41"}],"version-history":[{"count":7,"href":"https:\/\/www.networknet.nl\/apps\/wp\/wp-json\/wp\/v2\/posts\/41\/revisions"}],"predecessor-version":[{"id":1640,"href":"https:\/\/www.networknet.nl\/apps\/wp\/wp-json\/wp\/v2\/posts\/41\/revisions\/1640"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.networknet.nl\/apps\/wp\/wp-json\/wp\/v2\/media\/1762"}],"wp:attachment":[{"href":"https:\/\/www.networknet.nl\/apps\/wp\/wp-json\/wp\/v2\/media?parent=41"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.networknet.nl\/apps\/wp\/wp-json\/wp\/v2\/categories?post=41"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.networknet.nl\/apps\/wp\/wp-json\/wp\/v2\/tags?post=41"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}