{"id":1630,"date":"2013-09-30T07:22:48","date_gmt":"2013-09-30T05:22:48","guid":{"rendered":"http:\/\/raftaman.net\/?p=1630"},"modified":"2021-05-15T11:46:38","modified_gmt":"2021-05-15T09:46:38","slug":"setting-the-hostname-in-fedora-18","status":"publish","type":"post","link":"https:\/\/possiblelossofprecision.net\/?p=1630","title":{"rendered":"Setting the hostname in Fedora 18"},"content":{"rendered":"<p>Staring with <a href=\"http:\/\/docs.fedoraproject.org\/en-US\/Fedora\/18\/html\/Release_Notes\/sect-Release_Notes-Changes_for_Sysadmin.html\">Fedora 18<\/a>, the hostname is longer set it <code>\/etc\/sysconfig\/network<\/code> but in <strong><code>\/etc\/hostname<\/code><\/strong>. To manipulate the hostname there&#8217;s a small tool named <strong><code>hostnamectl<\/code><\/strong> which is part of Fedora&#8217;s <code>systemd<\/code> package.<\/p>\n<p>The following table (taken from the <a href=\"http:\/\/docs.fedoraproject.org\/en-US\/Fedora\/18\/html\/Release_Notes\/sect-Release_Notes-Changes_for_Sysadmin.html\">Fedora 18 Release Notes<\/a>) shows a few basic <code>hostnamectl<\/code> commands to set or change a host&#8217;s name:<\/p>\n\n<table id=\"tablepress-8\" class=\"tablepress tablepress-id-8\">\n<thead>\n<tr class=\"row-1\">\n\t<th class=\"column-1\">Command<\/th><th class=\"column-2\">Function<\/th>\n<\/tr>\n<\/thead>\n<tbody class=\"row-striping row-hover\">\n<tr class=\"row-2\">\n\t<td class=\"column-1\"><strong>hostnamectl set-hostname <em>fedorasystem<\/em> --pretty<\/strong><\/td><td class=\"column-2\">Set <em>pretty<\/em> hostname.<\/td>\n<\/tr>\n<tr class=\"row-3\">\n\t<td class=\"column-1\"><strong>hostnamectl set-hostname <em>fedorasystem.example.org<\/em> --static<\/strong><\/td><td class=\"column-2\">Set <em>static<\/em> hostname.<\/td>\n<\/tr>\n<tr class=\"row-4\">\n\t<td class=\"column-1\"><strong>hostnamectl set-hostname <em>fedora-dhcp-client.example.org<\/em> --transient<\/strong><\/td><td class=\"column-2\">Set <em>transient<\/em> hostname.<\/td>\n<\/tr>\n<tr class=\"row-5\">\n\t<td class=\"column-1\"><strong>hostnamectl set-hostname <em>fedorasystem.example.org<\/em><\/strong><\/td><td class=\"column-2\">Without arguments, <strong>hostnamectl<\/strong> will apply to all hostname types.<\/td>\n<\/tr>\n<tr class=\"row-6\">\n\t<td class=\"column-1\"><strong>hostnamectl status<\/strong><\/td><td class=\"column-2\">Show current hostname settings<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<!-- #tablepress-8 from cache -->\n<p>See also <a href=\"http:\/\/www.freedesktop.org\/software\/systemd\/man\/hostnamectl.html\">hostnamectl manpage<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Staring with Fedora 18, the hostname is longer set it \/etc\/sysconfig\/network but in \/etc\/hostname. To manipulate the hostname there&#8217;s a small tool named hostnamectl which is part of Fedora&#8217;s systemd package. The following table (taken from the Fedora 18 Release Notes) shows a few basic hostnamectl commands to set or change a host&#8217;s name: See also hostnamectl manpage.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[63,7],"class_list":["post-1630","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-dns","tag-fedora"],"_links":{"self":[{"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/posts\/1630","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1630"}],"version-history":[{"count":7,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/posts\/1630\/revisions"}],"predecessor-version":[{"id":1674,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=\/wp\/v2\/posts\/1630\/revisions\/1674"}],"wp:attachment":[{"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1630"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1630"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/possiblelossofprecision.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1630"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}