{"id":15774,"date":"2025-12-05T13:25:27","date_gmt":"2025-12-05T13:25:27","guid":{"rendered":"https:\/\/greenwebpage.com\/community\/?p=15774"},"modified":"2025-12-05T13:46:06","modified_gmt":"2025-12-05T13:46:06","slug":"how-to-change-hostname-on-centos-10","status":"publish","type":"post","link":"https:\/\/greenwebpage.com\/community\/how-to-change-hostname-on-centos-10\/","title":{"rendered":"How to Change Hostname on CentOS 10: Quick Guide"},"content":{"rendered":"\n<p>CentOS 10&#8217;s hostname can be changed easily, but it is essential to identify your server in a network properly. It also improves system organization and ensures smooth communication between applications and services. Setting the correct hostname is vital to maintaining clarity and avoiding connection or DNS issues. CentOS 10 offers multiple methods to safely update the hostname, whether you are managing a local machine, a VPS, or a production server.<\/p>\n\n\n\n<p>This guide will explain how to change the CentOS 10 hostname using hostnamectl. You&#8217;ll also learn about editing system files and NetworkManager. Each method is explained in detail so that you can pick the one that works best for your setup.<\/p>\n\n\n\n<p><strong>Table of Contents<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"#post-15774-_i5peben4ocmn\">How to Change Hostname on CentOS 10 <\/a>\n<ul class=\"wp-block-list\">\n<li><a href=\"#Method-1:-Change-Hostname-Using-hostnamectl-(Recommended)\">Method 1: Change Hostname Using hostnamectl (Recommended)<\/a><\/li>\n\n\n\n<li><a href=\"#Method-2:-Change-Hostname-by-Editing-etc-hostname\">Method 2: Change Hostname by Editing \/etc\/hostname<\/a><\/li>\n\n\n\n<li><a href=\"#Method-3:-Change-Hostname-Using-NetworkManager-(nmcli)\">Method 3: Change Hostname Using NetworkManager (nmcli)<\/a><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><a href=\"#Conclusion\">Conclusion<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"How-to-Change-Hostname-on-CentOS-10\"><a id=\"post-15774-_i5peben4ocmn\"><\/a>How to Change Hostname on CentOS 10<\/h2>\n\n\n\n<p>It is easiest to change the CentOS 10 hostname by using the hostnamectl tool. This is done by first running sudo set-hostname-new-hostname. Then, update the \/etc\/hosts so that services can resolve the new name, and then verify with hostnamectl. You can also edit \/etc\/hostname via NetworkManager or manually, but the most reliable and fastest method is to use hostnamectl.<\/p>\n\n\n\n<p>Let\u2019s show you how to change the hostname safely using hostnamectl, system files, and NetworkManager.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Method-1:-Change-Hostname-Using-hostnamectl-(Recommended)\"><a id=\"post-15774-_23cd35qhb73k\"><\/a>Method 1: Change Hostname Using hostnamectl (Recommended)<\/h3>\n\n\n\n<p>This is the fastest and safest method, because systemd&#8217;s hostnamectl updates the hostname immediately.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><a id=\"post-15774-_qo4pbp3k0xah\"><\/a>Step 1: Check Current Hostname<\/h4>\n\n\n\n<p>Let\u2019s see your CentOS 10 server currently using:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>\n<p>hostnamectl<\/p>\n<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img fetchpriority=\"high\" decoding=\"async\" width=\"966\" height=\"503\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15774-1.png\" alt=\"hostnamectl\" class=\"wp-image-15775\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15774-1.png 966w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15774-1-300x156.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15774-1-768x400.png 768w\" sizes=\"(max-width: 966px) 100vw, 966px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><a id=\"post-15774-_kh6jv2hge87v\"><\/a>Step 2: Set a New Hostname<\/h4>\n\n\n\n<p>Set your new hostname using this command (replace new-hostname with the name you want):<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>\n<p>sudo hostnamectl set-hostname new-hostname<\/p>\n<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"973\" height=\"108\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15774-2.png\" alt=\"sudo hostnamectl set-hostname new-hostname\" class=\"wp-image-15776\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15774-2.png 973w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15774-2-300x33.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15774-2-768x85.png 768w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15774-2-960x108.png 960w\" sizes=\"(max-width: 973px) 100vw, 973px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><a id=\"post-15774-_5n5qpux7kguq\"><\/a>Step 3: Verify the New Hostname<\/h4>\n\n\n\n<p>Confirm the successful update of the hostname:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>\n<p>hostnamectl<\/p>\n<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"970\" height=\"489\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15774-3.png\" alt=\"hostnamectl\" class=\"wp-image-15777\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15774-3.png 970w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15774-3-300x151.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15774-3-768x387.png 768w\" sizes=\"(max-width: 970px) 100vw, 970px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><a id=\"post-15774-_d4eztpeoa5o3\"><\/a>Step 4: Update \/etc\/hosts (Important for Local Resolution)<\/h4>\n\n\n\n<p>Enter your hostname to resolve local services correctly.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>\n<p>sudo nano \/etc\/hosts<\/p>\n<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Add or update:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>\n<p>127.0.0.1 new-hostname<\/p>\n<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"976\" height=\"599\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15774-4.png\" alt=\"Edit \/etc\/hosts file\" class=\"wp-image-15778\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15774-4.png 976w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15774-4-300x184.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15774-4-768x471.png 768w\" sizes=\"(max-width: 976px) 100vw, 976px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><a id=\"post-15774-_f75hr2j0p205\"><\/a>Step 5: Reboot (Optional but Recommended)<\/h4>\n\n\n\n<p>Some services only detect hostname changes after a reboot:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>\n<p>sudo reboot<\/p>\n<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"977\" height=\"93\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15774-5.png\" alt=\"sudo reboot\" class=\"wp-image-15779\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15774-5.png 977w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15774-5-300x29.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15774-5-768x73.png 768w\" sizes=\"(max-width: 977px) 100vw, 977px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Method-2:-Change-Hostname-by-Editing-etc-hostname\"><a id=\"post-15774-_q4xfhstghfpp\"><\/a>Method 2: Change Hostname by Editing \/etc\/hostname<\/h3>\n\n\n\n<p>This method updates the hostname file manually. CentOS 10 allows you to change the hostname easily, but it is important for many reasons. It helps identify your server in a network and improves system organization.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><a id=\"post-15774-_7qwpp7uurtga\"><\/a>Step 1: Open the Hostname File<\/h4>\n\n\n\n<p>This file contains the current hostname.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>\n<p>sudo nano \/etc\/hostname<\/p>\n<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"971\" height=\"332\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15774-6.png\" alt=\"edit \/etc\/hostname file\" class=\"wp-image-15780\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15774-6.png 971w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15774-6-300x103.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15774-6-768x263.png 768w\" sizes=\"(max-width: 971px) 100vw, 971px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><a id=\"post-15774-_43g4vkahmj58\"><\/a>Step 2: Replace Old Hostname with New One<\/h4>\n\n\n\n<p>The old hostname should be deleted and replaced with the new one.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"970\" height=\"221\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15774-7.png\" alt=\"edit \/etc\/hostname \" class=\"wp-image-15781\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15774-7.png 970w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15774-7-300x68.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15774-7-768x175.png 768w\" sizes=\"(max-width: 970px) 100vw, 970px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><a id=\"post-15774-_el0g3fi3v8zo\"><\/a>Step 3: Update \/etc\/hosts<\/h4>\n\n\n\n<p>Make sure local services can resolve the new hostname.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>\n<p>sudo nano \/etc\/hosts<\/p>\n<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Modify:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>\n<p>127.0.0.1 new-hostname<\/p>\n<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"968\" height=\"593\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15774-8.png\" alt=\"Edit \/etc\/hosts file\" class=\"wp-image-15782\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15774-8.png 968w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15774-8-300x184.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15774-8-768x470.png 768w\" sizes=\"(max-width: 968px) 100vw, 968px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><a id=\"post-15774-_yqdxzp9ak0d5\"><\/a>Step 4: Apply Changes by Rebooting<\/h4>\n\n\n\n<p>This method requires a reboot.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>\n<p>sudo reboot<\/p>\n<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"977\" height=\"93\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15774-9.png\" alt=\"sudo reboot\" class=\"wp-image-15783\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15774-9.png 977w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15774-9-300x29.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15774-9-768x73.png 768w\" sizes=\"(max-width: 977px) 100vw, 977px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Method-3:-Change-Hostname-Using-NetworkManager-(nmcli)\"><a id=\"post-15774-_8rmpqbjahrth\"><\/a>Method 3: Change Hostname Using NetworkManager (nmcli)<\/h3>\n\n\n\n<p>When managing systems, it is useful to know the hostname of the system and its network profile.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><a id=\"post-15774-_5iljh3bozbiy\"><\/a>Step 1: View Current Hostname<\/h4>\n\n\n\n<p>Let\u2019s see the Current Hostname:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>\n<p>nmcli general hostname<\/p>\n<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"972\" height=\"108\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15774-10.png\" alt=\"nmcli general hostname\" class=\"wp-image-15784\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15774-10.png 972w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15774-10-300x33.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15774-10-768x85.png 768w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15774-10-960x108.png 960w\" sizes=\"(max-width: 972px) 100vw, 972px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><a id=\"post-15774-_9wri40tw4b3a\"><\/a>Step 2: Set New Hostname<\/h4>\n\n\n\n<p>Let\u2019s set the new hostname:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>\n<p>sudo nmcli general hostname new-hostname<\/p>\n<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"968\" height=\"80\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15774-11.png\" alt=\"sudo nmcli general hostname new-hostname\" class=\"wp-image-15785\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15774-11.png 968w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15774-11-300x25.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15774-11-768x63.png 768w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15774-11-960x80.png 960w\" sizes=\"(max-width: 968px) 100vw, 968px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><a id=\"post-15774-_ji26agobhziu\"><\/a>Step 3: Restart NetworkManager<\/h4>\n\n\n\n<p>This will refresh network settings:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>\n<p>sudo systemctl restart NetworkManager<\/p>\n<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"86\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15774-12.png\" alt=\"sudo systemctl restart NetworkManager\" class=\"wp-image-15786\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15774-12.png 969w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15774-12-300x27.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15774-12-768x68.png 768w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15774-12-960x86.png 960w\" sizes=\"(max-width: 969px) 100vw, 969px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><a id=\"post-15774-_hztt5yvvokrv\"><\/a>Step 4: Verify the Updated Hostname<\/h4>\n\n\n\n<p>Let\u2019s check the updated hostname:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>\n<p>hostnamectl<\/p>\n<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"970\" height=\"514\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15774-13.png\" alt=\"hostnamectl\" class=\"wp-image-15787\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15774-13.png 970w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15774-13-300x159.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/word-image-15774-13-768x407.png 768w\" sizes=\"(max-width: 970px) 100vw, 970px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>That is all for changing the hostname on CentOS 10.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"Conclusion\"><a id=\"post-15774-_69b62bs4vf5m\"><\/a>Conclusion<\/h2>\n\n\n\n<p>CentOS 10 makes it easy to change the hostname. You can do this using Systemd&#8217;s Hostnamectl or by editing hostnames directly. Honamectl is the recommended method because it is faster, safer, and only requires a few steps. Update the hostname when you are configuring a VPS, customizing a local server, or preparing to deploy. This will keep your system organized and easy to manage.<\/p>\n\n    <div class=\"xs_social_share_widget xs_share_url after_content \t\tmain_content  wslu-style-1 wslu-share-box-shaped wslu-fill-colored wslu-none wslu-share-horizontal wslu-theme-font-no wslu-main_content\">\n\n\t\t\n        <ul>\n\t\t\t        <\/ul>\n    <\/div> \n","protected":false},"excerpt":{"rendered":"<p>CentOS 10&#8217;s hostname can be changed easily, but it is essential to identify your server in a network properly. It also improves system organization and ensures smooth communication between applications and services. Setting the correct hostname is vital to maintaining clarity and avoiding connection or DNS issues. CentOS 10 offers multiple methods to safely update [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":15792,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[43],"tags":[958,304,978,979],"class_list":["post-15774","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-centos-10","tag-hostname","tag-hostnamectl","tag-networkmanager"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Change Hostname on CentOS 10: Quick Guide<\/title>\n<meta name=\"description\" content=\"This guide will explain how to change the CentOS 10 hostname using hostnamectl, editing system files and NetworkManager utility.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/greenwebpage.com\/community\/how-to-change-hostname-on-centos-10\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Change Hostname on CentOS 10: Quick Guide\" \/>\n<meta property=\"og:description\" content=\"This guide will explain how to change the CentOS 10 hostname using hostnamectl, editing system files and NetworkManager utility.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/greenwebpage.com\/community\/how-to-change-hostname-on-centos-10\/\" \/>\n<meta property=\"og:site_name\" content=\"Greenwebpage Community\" \/>\n<meta property=\"article:published_time\" content=\"2025-12-05T13:25:27+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-12-05T13:46:06+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/How-to-Change-Hostname-on-CentOS-10.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1020\" \/>\n\t<meta property=\"og:image:height\" content=\"600\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Karim Buzdar\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Karim Buzdar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-change-hostname-on-centos-10\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-change-hostname-on-centos-10\/\"},\"author\":{\"name\":\"Karim Buzdar\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/467c100c1d017bc081473ee0440680c8\"},\"headline\":\"How to Change Hostname on CentOS 10: Quick Guide\",\"datePublished\":\"2025-12-05T13:25:27+00:00\",\"dateModified\":\"2025-12-05T13:46:06+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-change-hostname-on-centos-10\/\"},\"wordCount\":594,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/#organization\"},\"image\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-change-hostname-on-centos-10\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/How-to-Change-Hostname-on-CentOS-10.jpg\",\"keywords\":[\"CentOS 10\",\"Hostname\",\"hostnamectl\",\"networkmanager\"],\"articleSection\":[\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/greenwebpage.com\/community\/how-to-change-hostname-on-centos-10\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-change-hostname-on-centos-10\/\",\"url\":\"https:\/\/greenwebpage.com\/community\/how-to-change-hostname-on-centos-10\/\",\"name\":\"How to Change Hostname on CentOS 10: Quick Guide\",\"isPartOf\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-change-hostname-on-centos-10\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-change-hostname-on-centos-10\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/How-to-Change-Hostname-on-CentOS-10.jpg\",\"datePublished\":\"2025-12-05T13:25:27+00:00\",\"dateModified\":\"2025-12-05T13:46:06+00:00\",\"description\":\"This guide will explain how to change the CentOS 10 hostname using hostnamectl, editing system files and NetworkManager utility.\",\"breadcrumb\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-change-hostname-on-centos-10\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/greenwebpage.com\/community\/how-to-change-hostname-on-centos-10\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-change-hostname-on-centos-10\/#primaryimage\",\"url\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/How-to-Change-Hostname-on-CentOS-10.jpg\",\"contentUrl\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/How-to-Change-Hostname-on-CentOS-10.jpg\",\"width\":1020,\"height\":600,\"caption\":\"How to Change Hostname on CentOS 10\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-change-hostname-on-centos-10\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/greenwebpage.com\/community\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Change Hostname on CentOS 10: Quick Guide\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#website\",\"url\":\"https:\/\/greenwebpage.com\/community\/\",\"name\":\"Greenwebpage Community\",\"description\":\"Get online in three steps with our wide range of web hosting solutions. Choose from professional business to enterprise options designed to meet your needs.\",\"publisher\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/greenwebpage.com\/community\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#organization\",\"name\":\"Greenwebpage Community\",\"url\":\"https:\/\/greenwebpage.com\/community\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/10\/cropped-logomic.png\",\"contentUrl\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/10\/cropped-logomic.png\",\"width\":512,\"height\":512,\"caption\":\"Greenwebpage Community\"},\"image\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/467c100c1d017bc081473ee0440680c8\",\"name\":\"Karim Buzdar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/0628fcbcddd9bc5486245d2cf4a904dbcdeac9ad6c3098f49237094e9d513d0c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/0628fcbcddd9bc5486245d2cf4a904dbcdeac9ad6c3098f49237094e9d513d0c?s=96&d=mm&r=g\",\"caption\":\"Karim Buzdar\"},\"sameAs\":[\"https:\/\/greenwebpage.com\"],\"url\":\"https:\/\/greenwebpage.com\/community\/author\/karim\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Change Hostname on CentOS 10: Quick Guide","description":"This guide will explain how to change the CentOS 10 hostname using hostnamectl, editing system files and NetworkManager utility.","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:\/\/greenwebpage.com\/community\/how-to-change-hostname-on-centos-10\/","og_locale":"en_US","og_type":"article","og_title":"How to Change Hostname on CentOS 10: Quick Guide","og_description":"This guide will explain how to change the CentOS 10 hostname using hostnamectl, editing system files and NetworkManager utility.","og_url":"https:\/\/greenwebpage.com\/community\/how-to-change-hostname-on-centos-10\/","og_site_name":"Greenwebpage Community","article_published_time":"2025-12-05T13:25:27+00:00","article_modified_time":"2025-12-05T13:46:06+00:00","og_image":[{"width":1020,"height":600,"url":"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/How-to-Change-Hostname-on-CentOS-10.jpg","type":"image\/jpeg"}],"author":"Karim Buzdar","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Karim Buzdar","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/greenwebpage.com\/community\/how-to-change-hostname-on-centos-10\/#article","isPartOf":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-change-hostname-on-centos-10\/"},"author":{"name":"Karim Buzdar","@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/467c100c1d017bc081473ee0440680c8"},"headline":"How to Change Hostname on CentOS 10: Quick Guide","datePublished":"2025-12-05T13:25:27+00:00","dateModified":"2025-12-05T13:46:06+00:00","mainEntityOfPage":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-change-hostname-on-centos-10\/"},"wordCount":594,"commentCount":0,"publisher":{"@id":"https:\/\/greenwebpage.com\/community\/#organization"},"image":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-change-hostname-on-centos-10\/#primaryimage"},"thumbnailUrl":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/How-to-Change-Hostname-on-CentOS-10.jpg","keywords":["CentOS 10","Hostname","hostnamectl","networkmanager"],"articleSection":["Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/greenwebpage.com\/community\/how-to-change-hostname-on-centos-10\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/greenwebpage.com\/community\/how-to-change-hostname-on-centos-10\/","url":"https:\/\/greenwebpage.com\/community\/how-to-change-hostname-on-centos-10\/","name":"How to Change Hostname on CentOS 10: Quick Guide","isPartOf":{"@id":"https:\/\/greenwebpage.com\/community\/#website"},"primaryImageOfPage":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-change-hostname-on-centos-10\/#primaryimage"},"image":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-change-hostname-on-centos-10\/#primaryimage"},"thumbnailUrl":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/How-to-Change-Hostname-on-CentOS-10.jpg","datePublished":"2025-12-05T13:25:27+00:00","dateModified":"2025-12-05T13:46:06+00:00","description":"This guide will explain how to change the CentOS 10 hostname using hostnamectl, editing system files and NetworkManager utility.","breadcrumb":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-change-hostname-on-centos-10\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/greenwebpage.com\/community\/how-to-change-hostname-on-centos-10\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/greenwebpage.com\/community\/how-to-change-hostname-on-centos-10\/#primaryimage","url":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/How-to-Change-Hostname-on-CentOS-10.jpg","contentUrl":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/12\/How-to-Change-Hostname-on-CentOS-10.jpg","width":1020,"height":600,"caption":"How to Change Hostname on CentOS 10"},{"@type":"BreadcrumbList","@id":"https:\/\/greenwebpage.com\/community\/how-to-change-hostname-on-centos-10\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/greenwebpage.com\/community\/"},{"@type":"ListItem","position":2,"name":"How to Change Hostname on CentOS 10: Quick Guide"}]},{"@type":"WebSite","@id":"https:\/\/greenwebpage.com\/community\/#website","url":"https:\/\/greenwebpage.com\/community\/","name":"Greenwebpage Community","description":"Get online in three steps with our wide range of web hosting solutions. Choose from professional business to enterprise options designed to meet your needs.","publisher":{"@id":"https:\/\/greenwebpage.com\/community\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/greenwebpage.com\/community\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/greenwebpage.com\/community\/#organization","name":"Greenwebpage Community","url":"https:\/\/greenwebpage.com\/community\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/logo\/image\/","url":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/10\/cropped-logomic.png","contentUrl":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/10\/cropped-logomic.png","width":512,"height":512,"caption":"Greenwebpage Community"},"image":{"@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/467c100c1d017bc081473ee0440680c8","name":"Karim Buzdar","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/0628fcbcddd9bc5486245d2cf4a904dbcdeac9ad6c3098f49237094e9d513d0c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0628fcbcddd9bc5486245d2cf4a904dbcdeac9ad6c3098f49237094e9d513d0c?s=96&d=mm&r=g","caption":"Karim Buzdar"},"sameAs":["https:\/\/greenwebpage.com"],"url":"https:\/\/greenwebpage.com\/community\/author\/karim\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/posts\/15774","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/comments?post=15774"}],"version-history":[{"count":5,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/posts\/15774\/revisions"}],"predecessor-version":[{"id":15793,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/posts\/15774\/revisions\/15793"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/media\/15792"}],"wp:attachment":[{"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/media?parent=15774"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/categories?post=15774"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/tags?post=15774"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}