{"id":1453,"date":"2019-01-30T22:03:30","date_gmt":"2019-01-30T14:03:30","guid":{"rendered":"https:\/\/www.techcoil.com\/blog\/?p=1453"},"modified":"2019-02-06T14:33:05","modified_gmt":"2019-02-06T06:33:05","slug":"how-to-change-the-hostname-of-your-raspberry-pi-via-raspi-config-in-raspbian-stretch","status":"publish","type":"post","link":"https:\/\/www.techcoil.com\/blog\/how-to-change-the-hostname-of-your-raspberry-pi-via-raspi-config-in-raspbian-stretch\/","title":{"rendered":"How to change the hostname of your Raspberry Pi via raspi-config in Raspbian Stretch"},"content":{"rendered":"<p>When you install <a href=\"http:\/\/www.techcoil.com\/blog\/tag\/raspbian-stretch\" rel=\"noopener\" target=\"_blank\">Raspbian Stretch<\/a> as the operating system for your Raspberry Pi, the default hostname is <strong>raspberrypi<\/strong>.<\/p>\n<p>Since a <a href=\"https:\/\/www.techcoil.com\/blog\/tag\/raspberry-pi\/\" rel=\"noopener\" target=\"_blank\">Raspberry Pi<\/a> is one of the <a href=\"https:\/\/www.techcoil.com\/things-that-you-should-consider-getting-if-you-are-a-computer-programmer\" rel=\"noopener\" target=\"_blank\">things that programmers buy<\/a>, we could deploy several at home.<\/p>\n<p>When you have several Raspberry Pis deployed in your house, you may want them to be identified by hostnames.<\/p>\n<p>So how can we change the hostname of our Raspberry Pi running Raspbian Stretch? This post shows how you can change the hostname of your Raspberry Pi via <code>raspi-config<\/code> in Raspbian Stretch.<\/p>\n<p>First, open a Terminal window by clicking on the highlighted icon at the top:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/Raspbian-Stretch-20181113-desktop-with-a-terminal-window.jpg\" alt=\"Raspbian Stretch 20181113 desktop with a terminal window\"\/><\/p>\n<p>Once the terminal window had started, type the following command in the terminal window:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsudo raspi-config\r\n<\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/Raspbian-Stretch-20181113-terminal-window-with-sudo-raspi-config.jpg\" alt=\"Raspbian Stretch 20181113 terminal window with sudo raspi-config\"\/><\/p>\n<p>After <code>raspi-config<\/code> loads in your terminal, go through the following screens to change the hostname of your Pi in Raspbian Stretch:<\/p>\n<p>Select <strong>Network Options<\/strong> in the first menu of <code>raspi-config<\/code>:<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/Raspbian-Stretch-Lite-2018-06-27-raspi-config-with-Network-Options-selected.gif\" alt=\"Raspbian Stretch Lite 2018-06-27 raspi-config with Network Options selected\" \/><\/p>\n<p>When the Advanced Options menu loads, choose <strong>Hostname<\/strong>:<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/raspi-config-on-Raspbian-Stretch-20181113-with-Hostname-selected.jpg\" alt=\"raspi-config on Raspbian Stretch 20181113 with Hostname selected\" \/><\/p>\n<p>After you had selected <strong>Hostname<\/strong>, <strong>raspi-config<\/strong> shows RFC's mandate for hostname labels:<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/raspi-config-on-Raspbian-Stretch-20181113-showing-RFC-mandate-for-hostname-labels.jpg\" alt=\"raspi-config on Raspbian Stretch 20181113 showing RFC mandate for hostname labels\" \/><\/p>\n<p>After you had selected <strong>Ok<\/strong>, you will then see the existing hostname for your Raspberry Pi:<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/raspi-config-on-Raspbian-Stretch-20181113-showing-default-Raspberry-Pi-hostname.jpg\" alt=\"raspi-config on Raspbian Stretch 20181113 showing default Raspberry Pi hostname\" \/><\/p>\n<p>Enter a hostname that you desire. For example, if your Raspberry Pi is going to server as a <a href=\"https:\/\/www.techcoil.com\/blog\/the-reverse-proxy-server\/\" rel=\"noopener\" target=\"_blank\">reverse proxy server<\/a>, you may name it as follows:<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/raspi-config-on-Raspbian-Stretch-20181113-showing-reverse-proxy-server-pi-as-hostname.jpg\" alt=\"raspi-config on Raspbian Stretch 20181113 showing reverse-proxy-server-pi as hostname\" \/><\/p>\n<p>After you had entered your desired hostname, choose <strong>Finish<\/strong> in the first menu of raspi-config:<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/Raspbian-Stretch-20181113-raspi-config-initial-screen-with-Finish-selected.jpg\" alt=\"Raspbian Stretch 20181113 raspi-config initial screen with Finish selected\" \/><\/p>\n<p>When you do so, <code>raspi-config<\/code> will prompt you to restart your Raspberry Pi:<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/Raspbian-Stretch-20181113-raspi-config-Would-you-like-to-reboot-now.jpg\" alt=\"Raspbian Stretch 20181113 raspi-config Would you like to reboot now\" \/><\/p>\n<p>After you choose <strong>Yes<\/strong> to reboot your Raspberry Pi, it will take the new hostname that you had given it.<\/p>\n\n      <ul id=\"social-sharing-buttons-list\">\n        <li class=\"facebook\">\n          <a href=\"https:\/\/www.facebook.com\/sharer\/sharer.php?u=https%3A%2F%2Fwp.me%2Fp245TQ-nr\" target=\"_blank\" role=\"button\" rel=\"nofollow\">\n            <img decoding=\"async\" src=\"\/ph\/img\/3rd-party\/social-icons\/Facebook.png\" alt=\"Facebook icon\"> Share\n          <\/a>\n        <\/li>\n        <li class=\"twitter\">\n          <a href=\"https:\/\/twitter.com\/intent\/tweet?text=&url=https%3A%2F%2Fwp.me%2Fp245TQ-nr&via=Techcoil_com\" target=\"_blank\" role=\"button\" rel=\"nofollow\">\n          <img decoding=\"async\" src=\"\/ph\/img\/3rd-party\/social-icons\/Twitter.png\" alt=\"Twitter icon\"> Tweet\n          <\/a>\n        <\/li>\n        <li class=\"linkedin\">\n          <a href=\"https:\/\/www.linkedin.com\/shareArticle?mini=1&title=&url=https%3A%2F%2Fwp.me%2Fp245TQ-nr&source=https:\/\/www.techcoil.com\" target=\"_blank\" role=\"button\" rel=\"nofollow\">\n          <img decoding=\"async\" src=\"\/ph\/img\/3rd-party\/social-icons\/linkedin.png\" alt=\"Linkedin icon\"> Share\n          <\/a>\n        <\/li>\n        <li class=\"pinterest\">\n          <a href=\"https:\/\/pinterest.com\/pin\/create\/button\/?url=https%3A%2F%2Fwww.techcoil.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F1453&description=\" class=\"pin-it-button\" target=\"_blank\" role=\"button\" rel=\"nofollow\" count-layout=\"horizontal\">\n          <img decoding=\"async\" src=\"\/ph\/img\/3rd-party\/social-icons\/Pinterest.png\" alt=\"Pinterest icon\"> Save\n          <\/a>\n        <\/li>\n      <\/ul>\n    ","protected":false},"excerpt":{"rendered":"<p>When you install <a href=\"http:\/\/www.techcoil.com\/blog\/tag\/raspbian-stretch\" rel=\"noopener\" target=\"_blank\">Raspbian Stretch<\/a> as the operating system for your Raspberry Pi, the default hostname is <strong>raspberrypi<\/strong>.<\/p>\n<p>Since a Raspberry Pi is one of the <a href=\"https:\/\/www.techcoil.com\/things-that-you-should-consider-getting-if-you-are-a-computer-programmer\" rel=\"noopener\" target=\"_blank\">things that programmers buy<\/a>, we could deploy several at home.<\/p>\n<p>When you have several Raspberry Pis deployed in your house, you may want them to be identified by hostnames.<\/p>\n<p>So how can we change the hostname of our Raspberry Pi running Raspbian Stretch? This post shows how you can change the hostname of your Raspberry Pi via <code>raspi-config<\/code> in Raspbian Stretch.<\/p>\n","protected":false},"author":1,"featured_media":1458,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"footnotes":""},"categories":[4],"tags":[240,412,557,596,438],"jetpack_featured_media_url":"https:\/\/www.techcoil.com\/blog\/wp-content\/uploads\/raspi-config-on-Raspbian-Stretch-20181113-showing-default-Raspberry-Pi-hostname.jpg","jetpack_shortlink":"https:\/\/wp.me\/p245TQ-nr","jetpack-related-posts":[],"jetpack_likes_enabled":true,"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.techcoil.com\/blog\/wp-json\/wp\/v2\/posts\/1453"}],"collection":[{"href":"https:\/\/www.techcoil.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.techcoil.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.techcoil.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.techcoil.com\/blog\/wp-json\/wp\/v2\/comments?post=1453"}],"version-history":[{"count":0,"href":"https:\/\/www.techcoil.com\/blog\/wp-json\/wp\/v2\/posts\/1453\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.techcoil.com\/blog\/wp-json\/wp\/v2\/media\/1458"}],"wp:attachment":[{"href":"https:\/\/www.techcoil.com\/blog\/wp-json\/wp\/v2\/media?parent=1453"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.techcoil.com\/blog\/wp-json\/wp\/v2\/categories?post=1453"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.techcoil.com\/blog\/wp-json\/wp\/v2\/tags?post=1453"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}