How to change the hostname of your Raspberry Pi via raspi-config in Raspbian Stretch
When you install Raspbian Stretch as the operating system for your Raspberry Pi, the default hostname is raspberrypi.
Since a Raspberry Pi is one of the things that programmers buy, we could deploy several at home.
When you have several Raspberry Pis deployed in your house, you may want them to be identified by hostnames.
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 raspi-config
in Raspbian Stretch.
First, open a Terminal window by clicking on the highlighted icon at the top:
Once the terminal window had started, type the following command in the terminal window:
sudo raspi-config
After raspi-config
loads in your terminal, go through the following screens to change the hostname of your Pi in Raspbian Stretch:
Select Network Options in the first menu of raspi-config
:
When the Advanced Options menu loads, choose Hostname:
After you had selected Hostname, raspi-config shows RFC's mandate for hostname labels:
After you had selected Ok, you will then see the existing hostname for your Raspberry Pi:
Enter a hostname that you desire. For example, if your Raspberry Pi is going to server as a reverse proxy server, you may name it as follows:
After you had entered your desired hostname, choose Finish in the first menu of raspi-config:
When you do so, raspi-config
will prompt you to restart your Raspberry Pi:
After you choose Yes to reboot your Raspberry Pi, it will take the new hostname that you had given it.