{"id":2268,"date":"2023-02-27T13:20:28","date_gmt":"2023-02-27T21:20:28","guid":{"rendered":"https:\/\/jetstreamsoft.com\/portal\/?post_type=ht_kb&#038;p=2268"},"modified":"2024-12-12T15:00:58","modified_gmt":"2024-12-12T23:00:58","slug":"change-linux-vm-dns-name","status":"publish","type":"ht_kb","link":"https:\/\/jetstreamsoft.com\/portal\/jetstream-knowledge-base\/change-linux-vm-dns-name\/","title":{"rendered":"Change DNS Name of a Linux Virtual Machine"},"content":{"rendered":"\n<p>It may be necessary to edit the DNS name of a Linux virtual machine. This can be accomplished following these steps:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>View the current hostname of the virtual machine: SSH into the machine and execute the command <kbd><strong>hostnamectl status<\/strong><\/kbd>.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-full\"><img fetchpriority=\"high\" decoding=\"async\" width=\"468\" height=\"197\" src=\"https:\/\/jetstreamsoft.com\/portal\/wp-content\/uploads\/2023\/02\/image-14.png\" alt=\"\" class=\"wp-image-2269\" srcset=\"https:\/\/jetstreamsoft.com\/portal\/wp-content\/uploads\/2023\/02\/image-14.png 468w, https:\/\/jetstreamsoft.com\/portal\/wp-content\/uploads\/2023\/02\/image-14-300x126.png 300w, https:\/\/jetstreamsoft.com\/portal\/wp-content\/uploads\/2023\/02\/image-14-50x21.png 50w\" sizes=\"(max-width: 468px) 100vw, 468px\" \/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"2\">\n<li>Execute the command <kbd><strong>hostnamectl set-hostname &lt;NAME&gt;<\/strong><\/kbd> to set the system hostname.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"568\" height=\"48\" src=\"https:\/\/jetstreamsoft.com\/portal\/wp-content\/uploads\/2023\/02\/image-15.png\" alt=\"\" class=\"wp-image-2270\" srcset=\"https:\/\/jetstreamsoft.com\/portal\/wp-content\/uploads\/2023\/02\/image-15.png 568w, https:\/\/jetstreamsoft.com\/portal\/wp-content\/uploads\/2023\/02\/image-15-300x25.png 300w, https:\/\/jetstreamsoft.com\/portal\/wp-content\/uploads\/2023\/02\/image-15-50x4.png 50w\" sizes=\"(max-width: 568px) 100vw, 568px\" \/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"3\">\n<li>Restart the VM to allow the modifications to take effect.<\/li>\n<\/ol>\n\n\n\n<p><\/p>\n\n\n\n<p>If any issues are encounted using the above commands, an alternative technique is to manually edit the file <code><strong>\/etc\/hostname<\/strong><\/code> to update the hostname.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It may be necessary to edit the DNS name of a Linux virtual machine. This can be accomplished following these steps: If any issues are encounted using the above commands, an alternative technique is to manually edit the file \/etc\/hostname to update the hostname.<\/p>\n","protected":false},"author":1,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"nf_dc_page":"","footnotes":""},"ht-kb-category":[245],"ht-kb-tag":[227],"class_list":["post-2268","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-how-to","ht_kb_tag-network-connectivity"],"_links":{"self":[{"href":"https:\/\/jetstreamsoft.com\/portal\/wp-json\/wp\/v2\/ht-kb\/2268","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jetstreamsoft.com\/portal\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/jetstreamsoft.com\/portal\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/jetstreamsoft.com\/portal\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jetstreamsoft.com\/portal\/wp-json\/wp\/v2\/comments?post=2268"}],"version-history":[{"count":1,"href":"https:\/\/jetstreamsoft.com\/portal\/wp-json\/wp\/v2\/ht-kb\/2268\/revisions"}],"predecessor-version":[{"id":5617,"href":"https:\/\/jetstreamsoft.com\/portal\/wp-json\/wp\/v2\/ht-kb\/2268\/revisions\/5617"}],"wp:attachment":[{"href":"https:\/\/jetstreamsoft.com\/portal\/wp-json\/wp\/v2\/media?parent=2268"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/jetstreamsoft.com\/portal\/wp-json\/wp\/v2\/ht-kb-category?post=2268"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/jetstreamsoft.com\/portal\/wp-json\/wp\/v2\/ht-kb-tag?post=2268"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}