{"id":1546,"date":"2019-07-14T12:27:52","date_gmt":"2019-07-14T05:27:52","guid":{"rendered":"https:\/\/www.linuxid.net\/post\/?p=1546"},"modified":"2025-04-18T15:21:57","modified_gmt":"2025-04-18T08:21:57","slug":"cara-mudah-mengubah-hostname-di-debian-10","status":"publish","type":"post","link":"https:\/\/www.linuxid.net\/post\/cara-mudah-mengubah-hostname-di-debian-10\/","title":{"rendered":"Cara Mudah Mengubah Hostname di Debian 10"},"content":{"rendered":"<p>Tutorial ini menjelaskan cara mengubah hostname di Debian 10 Buster tanpa me-restart sistem.<\/p>\n<p>Hostname diatur pada saat sistem operasi Debian diinstal atau jika Anda menginstall mesin virtual, nama itu ditetapkan secara dinamis ke instance pada saat startup.<\/p>\n<h2>Prasyarat<\/h2>\n<p>Untuk dapat mengubah nama host pada sistem, Anda harus login sebagai root atau pengguna<a href=\"https:\/\/www.linuxid.net\/post\/cara-membuat-user-sudo-di-debian-linux\/\"> dengan hak akses sudo.<\/a><\/p>\n<h2>Tampilkan hostname Saat Ini<\/h2>\n<p>Di Debian 10 dan semua distribusi Linux lainnya yang menggunakan <code>systemd<\/code>, Anda dapat mengubah dan menampilkan nama host dari sistem yang diberikan dengan tool<code>hostnamectl<\/code>.<\/p>\n<p>Untuk melihat nama host sistem saat ini, ketik <code>hostnamectl<\/code> tanpa opsi apa pun:<\/p>\n<pre>hostnamectl<\/pre>\n<p>Output akan menampilkan nama host sistem saat ini, dalam contoh ini yaitu <code>host.linuxid.net.<\/code><\/p>\n<pre>   Static hostname: host.linuxid.net&#13;\n         Icon name: computer-vm&#13;\nChassis: vm&#13;\n        Machine ID: 70a3f06299526fd9ac42e5dc1de1034a&#13;\nBoot ID: 1dc8b9af89a4426b99cb487f6d486587&#13;\n    Virtualization: oracle&#13;\n  Operating System: Debian GNU\/Linux 10 (buster)&#13;\n Kernel: Linux 4.19.0-5-amd64&#13;\n      Architecture: x86-64<\/pre>\n<h2>Mengganti Hostname Sistem<\/h2>\n<p>Hostname adalah label yang mengidentifikasi mesin di jaringan. Anda tidak boleh menetapkan nama host yang sama di dua mesin yang berbeda di jaringan yang sama. Disarankan untuk menggunakan <em>fully-qualified domain name (<a href=\"https:\/\/kb.iu.edu\/d\/aiuv\"><code>FQDN<\/code><\/a><\/em>) sebagai\u00a0hostname sistem.<\/p>\n<p>Ada dua langkah yang terlibat saat mengubah nama host sistem pada Debian 10. Pertama, atur hostname baru menggunakan perintah <code>hostnamectl set-hostname<\/code> diikuti dengan nama host yang diinginkan dan kemudian perbarui file <code>\/etc\/hosts<\/code> dengan nama host yang baru.<\/p>\n<p>Misalnya, untuk mengubah nama host sistem ke <code>debian.linuxid.net<\/code>, Anda akan melakukan langkah-langkah berikut:<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\n<li>Pertama-tama atur nama host baru dengan menjalankan:\n<pre>sudo hostnamectl set-hostname debian.linuxid.net<\/pre>\n<p>Perlu di perhatikan bahwa, Perintah <code>hostnamectl<\/code> tidak menghasilkan output.<\/p>\n<\/li>\n<li>Kedua, buka file\u00a0<code>\/etc\/hosts<\/code>\u00a0dan gantikan hostname lama dengan hostname yang baru.\n<pre>sudo nano \/etc\/hosts<\/pre>\n<pre>127.0.0.1   localhost&#13;\n127.0.0.1   debian.linuxid.net&#13;\n&#13;\n# The following lines are desirable for IPv6 capable hosts&#13;\n::1     localhost ip6-localhost ip6-loopback&#13;\nff02::1 ip6-allnodes&#13;\nff02::2 ip6-allrouters<\/pre>\n<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<h2>Verifikasi Perubahan<\/h2>\n<p>Untuk memverifikasi bahwa hostname berhasil diubah, sekali lagi gunakan perintah <code>hostnamectl<\/code>:<\/p>\n<pre>hostnamectl<\/pre>\n<p>Hostname sistem baru akan dicetak pada baris perintah.<\/p>\n<pre>   Static hostname: debian.linuxid.net&#13;\n         Icon name: computer-vm&#13;\nChassis: vm&#13;\n        Machine ID: 70a3f06299526fd9ac42e5dc1de1034a&#13;\nBoot ID: 1dc8b9af89a4426b99cb487f6d486587&#13;\n    Virtualization: oracle&#13;\n  Operating System: Debian GNU\/Linux 10 (buster)&#13;\n Kernel: Linux 4.19.0-5-amd64&#13;\n      Architecture: x86-64<\/pre>\n<h2>Kesimpulan<\/h2>\n<p>Mengubah hostname sistem pada Debian 10 Buster adalah tugas yang mudah, hanya melibatkan dua langkah sederhana.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Tutorial ini menjelaskan cara mengubah hostname di Debian 10 Buster tanpa me-restart sistem. Hostname diatur&hellip;<\/p>\n","protected":false},"author":2,"featured_media":1547,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[16,79,72],"class_list":["post-1546","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-debian","tag-debian","tag-debian-10","tag-linux-terminal"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Cara Mudah Mengubah Hostname di Debian 10 - Linuxid<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/linuxid.net\/post\/cara-mudah-mengubah-hostname-di-debian-10\/\" \/>\n<meta property=\"og:locale\" content=\"id_ID\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Cara Mudah Mengubah Hostname di Debian 10 - Linuxid\" \/>\n<meta property=\"og:description\" content=\"Tutorial ini menjelaskan cara mengubah hostname di Debian 10 Buster tanpa me-restart sistem. Hostname diatur&hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/linuxid.net\/post\/cara-mudah-mengubah-hostname-di-debian-10\/\" \/>\n<meta property=\"og:site_name\" content=\"Linuxid\" \/>\n<meta property=\"article:published_time\" content=\"2019-07-14T05:27:52+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-04-18T08:21:57+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/linuxid.net\/post\/wp-content\/uploads\/2025\/03\/Mengganti-Hostname-Debian-10.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1000\" \/>\n\t<meta property=\"og:image:height\" content=\"530\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"xsand\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Ditulis oleh\" \/>\n\t<meta name=\"twitter:data1\" content=\"xsand\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimasi waktu membaca\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 menit\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/linuxid.net\/post\/cara-mudah-mengubah-hostname-di-debian-10\/\",\"url\":\"https:\/\/linuxid.net\/post\/cara-mudah-mengubah-hostname-di-debian-10\/\",\"name\":\"Cara Mudah Mengubah Hostname di Debian 10 - Linuxid\",\"isPartOf\":{\"@id\":\"https:\/\/linuxid.net\/post\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/linuxid.net\/post\/cara-mudah-mengubah-hostname-di-debian-10\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/linuxid.net\/post\/cara-mudah-mengubah-hostname-di-debian-10\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.linuxid.net\/post\/wp-content\/uploads\/2025\/03\/Mengganti-Hostname-Debian-10.jpg\",\"datePublished\":\"2019-07-14T05:27:52+00:00\",\"dateModified\":\"2025-04-18T08:21:57+00:00\",\"author\":{\"@id\":\"https:\/\/linuxid.net\/post\/#\/schema\/person\/e6642d26041eab9fef2677e204e89d79\"},\"breadcrumb\":{\"@id\":\"https:\/\/linuxid.net\/post\/cara-mudah-mengubah-hostname-di-debian-10\/#breadcrumb\"},\"inLanguage\":\"id\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/linuxid.net\/post\/cara-mudah-mengubah-hostname-di-debian-10\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"id\",\"@id\":\"https:\/\/linuxid.net\/post\/cara-mudah-mengubah-hostname-di-debian-10\/#primaryimage\",\"url\":\"https:\/\/www.linuxid.net\/post\/wp-content\/uploads\/2025\/03\/Mengganti-Hostname-Debian-10.jpg\",\"contentUrl\":\"https:\/\/www.linuxid.net\/post\/wp-content\/uploads\/2025\/03\/Mengganti-Hostname-Debian-10.jpg\",\"width\":1000,\"height\":530},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/linuxid.net\/post\/cara-mudah-mengubah-hostname-di-debian-10\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Beranda\",\"item\":\"https:\/\/linuxid.net\/post\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Cara Mudah Mengubah Hostname di Debian 10\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/linuxid.net\/post\/#website\",\"url\":\"https:\/\/linuxid.net\/post\/\",\"name\":\"Linuxid\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/linuxid.net\/post\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"id\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/linuxid.net\/post\/#\/schema\/person\/e6642d26041eab9fef2677e204e89d79\",\"name\":\"xsand\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"id\",\"@id\":\"https:\/\/linuxid.net\/post\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/cc8513768e15fa0758099a0ba5b898f3?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/cc8513768e15fa0758099a0ba5b898f3?s=96&d=mm&r=g\",\"caption\":\"xsand\"},\"url\":\"https:\/\/www.linuxid.net\/post\/author\/xsand\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Cara Mudah Mengubah Hostname di Debian 10 - Linuxid","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/linuxid.net\/post\/cara-mudah-mengubah-hostname-di-debian-10\/","og_locale":"id_ID","og_type":"article","og_title":"Cara Mudah Mengubah Hostname di Debian 10 - Linuxid","og_description":"Tutorial ini menjelaskan cara mengubah hostname di Debian 10 Buster tanpa me-restart sistem. Hostname diatur&hellip;","og_url":"https:\/\/linuxid.net\/post\/cara-mudah-mengubah-hostname-di-debian-10\/","og_site_name":"Linuxid","article_published_time":"2019-07-14T05:27:52+00:00","article_modified_time":"2025-04-18T08:21:57+00:00","og_image":[{"width":1000,"height":530,"url":"https:\/\/linuxid.net\/post\/wp-content\/uploads\/2025\/03\/Mengganti-Hostname-Debian-10.jpg","type":"image\/jpeg"}],"author":"xsand","twitter_card":"summary_large_image","twitter_misc":{"Ditulis oleh":"xsand","Estimasi waktu membaca":"2 menit"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/linuxid.net\/post\/cara-mudah-mengubah-hostname-di-debian-10\/","url":"https:\/\/linuxid.net\/post\/cara-mudah-mengubah-hostname-di-debian-10\/","name":"Cara Mudah Mengubah Hostname di Debian 10 - Linuxid","isPartOf":{"@id":"https:\/\/linuxid.net\/post\/#website"},"primaryImageOfPage":{"@id":"https:\/\/linuxid.net\/post\/cara-mudah-mengubah-hostname-di-debian-10\/#primaryimage"},"image":{"@id":"https:\/\/linuxid.net\/post\/cara-mudah-mengubah-hostname-di-debian-10\/#primaryimage"},"thumbnailUrl":"https:\/\/www.linuxid.net\/post\/wp-content\/uploads\/2025\/03\/Mengganti-Hostname-Debian-10.jpg","datePublished":"2019-07-14T05:27:52+00:00","dateModified":"2025-04-18T08:21:57+00:00","author":{"@id":"https:\/\/linuxid.net\/post\/#\/schema\/person\/e6642d26041eab9fef2677e204e89d79"},"breadcrumb":{"@id":"https:\/\/linuxid.net\/post\/cara-mudah-mengubah-hostname-di-debian-10\/#breadcrumb"},"inLanguage":"id","potentialAction":[{"@type":"ReadAction","target":["https:\/\/linuxid.net\/post\/cara-mudah-mengubah-hostname-di-debian-10\/"]}]},{"@type":"ImageObject","inLanguage":"id","@id":"https:\/\/linuxid.net\/post\/cara-mudah-mengubah-hostname-di-debian-10\/#primaryimage","url":"https:\/\/www.linuxid.net\/post\/wp-content\/uploads\/2025\/03\/Mengganti-Hostname-Debian-10.jpg","contentUrl":"https:\/\/www.linuxid.net\/post\/wp-content\/uploads\/2025\/03\/Mengganti-Hostname-Debian-10.jpg","width":1000,"height":530},{"@type":"BreadcrumbList","@id":"https:\/\/linuxid.net\/post\/cara-mudah-mengubah-hostname-di-debian-10\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Beranda","item":"https:\/\/linuxid.net\/post\/"},{"@type":"ListItem","position":2,"name":"Cara Mudah Mengubah Hostname di Debian 10"}]},{"@type":"WebSite","@id":"https:\/\/linuxid.net\/post\/#website","url":"https:\/\/linuxid.net\/post\/","name":"Linuxid","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/linuxid.net\/post\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"id"},{"@type":"Person","@id":"https:\/\/linuxid.net\/post\/#\/schema\/person\/e6642d26041eab9fef2677e204e89d79","name":"xsand","image":{"@type":"ImageObject","inLanguage":"id","@id":"https:\/\/linuxid.net\/post\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/cc8513768e15fa0758099a0ba5b898f3?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/cc8513768e15fa0758099a0ba5b898f3?s=96&d=mm&r=g","caption":"xsand"},"url":"https:\/\/www.linuxid.net\/post\/author\/xsand\/"}]}},"_links":{"self":[{"href":"https:\/\/www.linuxid.net\/post\/wp-json\/wp\/v2\/posts\/1546","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.linuxid.net\/post\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxid.net\/post\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxid.net\/post\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxid.net\/post\/wp-json\/wp\/v2\/comments?post=1546"}],"version-history":[{"count":1,"href":"https:\/\/www.linuxid.net\/post\/wp-json\/wp\/v2\/posts\/1546\/revisions"}],"predecessor-version":[{"id":2894,"href":"https:\/\/www.linuxid.net\/post\/wp-json\/wp\/v2\/posts\/1546\/revisions\/2894"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.linuxid.net\/post\/wp-json\/wp\/v2\/media\/1547"}],"wp:attachment":[{"href":"https:\/\/www.linuxid.net\/post\/wp-json\/wp\/v2\/media?parent=1546"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxid.net\/post\/wp-json\/wp\/v2\/categories?post=1546"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxid.net\/post\/wp-json\/wp\/v2\/tags?post=1546"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}