How to Set Up a Raspberry Pi Without a Monitor, Keyboard and/or Mouse

The essential settings I find myself configuring every time I install Raspbian from scratch are:
– Connecting the Raspberry Pi to the wireless network;
– Enabling SSH access to the Raspberry Pi;

Obviously it is a nuisance to connect a monitor, keyboard and mouse just to configure these settings, especially if you want to use the Raspberry Pi as a server (where a monitor, keyboard and mouse are not needed for day-to-day use) rather than as a desktop workstation.

To configure the Wi-Fi network and enable SSH on the Raspberry Pi, simply create 2 files in the “boot” partition of the SD card immediately after writing the disk image (of course, if you have restored a backup of a Raspberry Pi where these two settings were already configured, you won’t need to repeat this procedure).

the first file is for the Wi-Fi configuration, so simply create a new text file called wpa_supplicant.conf.
Open this file with Notepad (on Windows), TextEdit (on Mac), or from the terminal (on Linux or Mac) with the command:
sudo nano /Volumes/boot/wpa_supplicant.conf

enter the following in this file:

country=IT
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
    ssid="your Wi-Fi network name"
    psk="your Wi-Fi network password"
}

Of course, replace the Wi-Fi network name and password fields with the ones you want to use.

The next step is to enable SSH. In this case, simply create an empty file called “ssh” (with no extension) and place it in the boot partition of the microSD card as well.

Now you can eject the microSD card and insert it into the Raspberry Pi; once it has booted, you will see that it connects automatically to your wireless network. You can then log in via SSH and continue configuring the Raspberry Pi without having to connect a monitor, keyboard and mouse.

Enjoy!

Enjoy!

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top