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:
Raspbian Buster 20190710 taskbar with terminal program icon hovered

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:
20191022 raspi-config just started up

Given that, select Network Options:

Once the Network Options menu loads, select Hostname:
20191022 raspi-config screenshot with Hostname selected

After you had done so, raspi-config shows how you should name your new hostname, type enter to continue:
20191022 raspi-config showing RFC mandate on hostname

Next, enter a new hostname for your Raspberry Pi:
20191022 raspi-config with pi4plants as input to new hostname

Once you are done, raspi-config brings you to the initial page. Select Finish to complete the configuration change:
20191010 screenshot of raspi-config at starting screen with Finish selected

At this point in time, raspi-config will prompt you to restart you Raspberry Pi:
20191022 raspi-config prompts for reboot

After your Raspberry Pi had restarted, it will take the new hostname.

About Clivant

Clivant a.k.a Chai Heng enjoys composing software and building systems to serve people. He owns techcoil.com and hopes that whatever he had written and built so far had benefited people. All views expressed belongs to him and are not representative of the company that he works/worked for.