{"id":678,"date":"2010-02-09T21:17:34","date_gmt":"2010-02-09T21:17:34","guid":{"rendered":"http:\/\/www.codingfriends.com\/?p=678"},"modified":"2010-02-09T21:17:34","modified_gmt":"2010-02-09T21:17:34","slug":"changing-the-hostname","status":"publish","type":"post","link":"https:\/\/www.codingfriends.com\/index.php\/2010\/02\/09\/changing-the-hostname\/","title":{"rendered":"changing the hostname"},"content":{"rendered":"<p>To change the hostname of a linux distribution you can either change the hostname on-the-fly, but it does not restore it after a reboot.  To change the hostname on-the-fly you can do<\/p>\n<pre lang=\"bash\">\r\necho \"your new hostname\" > \/proc\/sys\/kernel\/hostname\r\n<\/pre>\n<p>on a ubuntu\/debian system to alter the hostname after a reboot you can alter the <\/p>\n<p>\/etc\/hostname<\/p>\n<p>file, if you cannot find the hostname file there, you can search for the file within the \/etc directory by<\/p>\n<pre lang=\"bash\">\r\ngrep -R \"your hostname\" \/etc\r\n<\/pre>\n<p>it will display a few files, but you should find out where your hostname is set, normally either within \/etc\/sysconfig or \/etc\/network directories.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>To change the hostname of a linux distribution you can either change the hostname on-the-fly, but it does not restore it after a reboot. To change the hostname on-the-fly you can do echo &#8220;your new hostname&#8221; > \/proc\/sys\/kernel\/hostname on a ubuntu\/debian system to alter the hostname after a reboot you can alter the \/etc\/hostname file, &hellip; <a href=\"https:\/\/www.codingfriends.com\/index.php\/2010\/02\/09\/changing-the-hostname\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">changing the hostname<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[95],"class_list":["post-678","post","type-post","status-publish","format-standard","hentry","category-linux","tag-hostname"],"_links":{"self":[{"href":"https:\/\/www.codingfriends.com\/index.php\/wp-json\/wp\/v2\/posts\/678","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.codingfriends.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codingfriends.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codingfriends.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codingfriends.com\/index.php\/wp-json\/wp\/v2\/comments?post=678"}],"version-history":[{"count":1,"href":"https:\/\/www.codingfriends.com\/index.php\/wp-json\/wp\/v2\/posts\/678\/revisions"}],"predecessor-version":[{"id":679,"href":"https:\/\/www.codingfriends.com\/index.php\/wp-json\/wp\/v2\/posts\/678\/revisions\/679"}],"wp:attachment":[{"href":"https:\/\/www.codingfriends.com\/index.php\/wp-json\/wp\/v2\/media?parent=678"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codingfriends.com\/index.php\/wp-json\/wp\/v2\/categories?post=678"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codingfriends.com\/index.php\/wp-json\/wp\/v2\/tags?post=678"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}