How to change the hostname of your Raspberry Pi, running Raspbian, with raspi-config
When you deploy multiple Raspberry Pis in your house, it is a good practice to give each of them a unique hostname. Since the default hostname for Raspbian is raspberrypi, it will be easier to look for the IP address of a new Raspbian installation in this situation.
Given that, let us look at how you can change the hostname of your Raspberry Pi in Raspbian via the Raspberry Pi Software Configuration Tool (raspi-config
).
Since the Raspberry Pi Software Configuration Tool is a command line application, you will need a terminal program to use it.
If you are using Raspbian (for example Raspbian Buster) with a windowing system, then you will click on the terminal program icon to start a terminal program:
When you have started a terminal program, enter the following command to launch the Raspberry Pi Software Configuration Tool:
sudo raspi-config
After you had done so, the Raspberry Pi Software Configuration Tool will start in your terminal program:
Given that, select Network Options:
Once the Network Options menu loads, select Hostname:
After you had done so, raspi-config shows how you should name your new hostname, type enter to continue:
Next, enter a new hostname for your Raspberry Pi:
Once you are done, raspi-config
brings you to the initial page. Select Finish to complete the configuration change:
At this point in time, raspi-config
will prompt you to restart you Raspberry Pi:
After your Raspberry Pi had restarted, it will take the new hostname.