{"id":3241,"date":"2014-04-28T08:47:11","date_gmt":"2014-04-28T08:47:11","guid":{"rendered":"http:\/\/ubuntuhandbook.org\/?p=3241"},"modified":"2014-04-28T08:47:11","modified_gmt":"2014-04-28T08:47:11","slug":"change-hostname-ubuntu1404","status":"publish","type":"post","link":"https:\/\/ubuntuhandbook.org\/index.php\/2014\/04\/change-hostname-ubuntu1404\/","title":{"rendered":"How to Change Hostname (Computer Name) in Ubuntu 14.04"},"content":{"rendered":"<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2014\/03\/ubuntu-logo-32.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2014\/03\/ubuntu-logo-32.png\" alt=\"ubuntu 14.04 change hostname\" width=\"200\" height=\"200\" class=\"aligncenter size-full wp-image-3081\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2014\/03\/ubuntu-logo-32.png 200w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2014\/03\/ubuntu-logo-32-150x150.png 150w\" sizes=\"auto, (max-width: 200px) 100vw, 200px\" \/><\/a><\/p>\n<p>This simple and brief tutorial is going to show you how to change the Hostname \/ Computer name in Ubuntu 14.04 Trusty Tahr. <\/p>\n<p>The default name was set when you were installing Ubuntu. You can easily change it to whatever you want in both Desktop &#038; Server by editing the hosts and hostname files. Below is how:<\/p>\n<p>1. Press Ctrl+Alt+T on keyboard to open the terminal. When it opens, run the below command:<\/p>\n<pre style=\"border:none;\">hostname NEW_NAME_HERE<\/pre>\n<p>This will change the hostname until next reboot. The change won\u2019t be visible immediately in your current terminal. Start a new terminal to see the new hostname.<\/p>\n<p>2. To change the name permanently, run command to edit the host files:<\/p>\n<pre style=\"border:none;\">sudo gedit \/etc\/hostname \/etc\/hosts<\/pre>\n<p>For Ubuntu server without a GUI, run <code>sudo vi \/etc\/hostname<\/code> and <code>sudo vi \/etc\/hosts<\/code> and edit them one by one.<\/p>\n<p>In both files, change the name to what you want and save them.<\/p>\n<div id=\"attachment_2016\" style=\"width: 590px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2013\/10\/Computer-Name-Ubuntu1310.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-2016\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2013\/10\/Computer-Name-Ubuntu1310.jpg\" alt=\"change Computer name ubuntu\" width=\"580\" height=\"313\" class=\"size-full wp-image-2016\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2013\/10\/Computer-Name-Ubuntu1310.jpg 580w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2013\/10\/Computer-Name-Ubuntu1310-300x161.jpg 300w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><\/a><p id=\"caption-attachment-2016\" class=\"wp-caption-text\">change Computer name ubuntu<\/p><\/div>\n<p>Finally, restart your computer to apply the changes.<\/p>","protected":false},"excerpt":{"rendered":"<p>This simple and brief tutorial is going to show you how to change the Hostname \/ Computer name in Ubuntu 14.04 Trusty Tahr. The default name was set when you were installing Ubuntu. You can easily change it to whatever you want in both Desktop &#038; Server by editing the hosts and hostname files. Below [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[733,732,855],"class_list":["post-3241","post","type-post","status-publish","format-standard","hentry","category-howtos","tag-computer-name","tag-hostname","tag-ubuntu-14-04"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/3241","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/comments?post=3241"}],"version-history":[{"count":0,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/3241\/revisions"}],"wp:attachment":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media?parent=3241"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/categories?post=3241"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/tags?post=3241"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}