Download the latest version of Raspbian Lite, which is the version without a desktop environment.
First install Raspbian onto a mini sd card using a tool like Etcher. When the burning is done, mount the drive onto your computer. If we want to access the Raspberry PI using SSH (which we want) we need to add two files to the root of the mounted drive before we can use it in the Pi:
- A file called ssh with no content.
- A file called wpa_supplicant.conf which should have your wifi credentials and look something like this (change the country to your country code):
country=NL
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="Network Name"
scan_ssid=1
psk="The password"
}
Put the card into the Raspberry Pi and start it up. You can now connect to the pi using your terminal, with ssh. There are several ways to find the ip address of your Pi, I use the web interface of my router. Find it, and then ssh to it:
ssh [email protected]
The default password is raspberry
Now change the password and network name:
echo "pi:newPassword" | sudo chpasswd
sudo sed -i "s/raspberrypi/new name/" /etc/hostname
sudo sed -i "s/raspberrypi/new name/" /etc/hosts
Expand the filesystem to use the complete disk
sudo raspi-config
Use your arrow keys to select Advanced Options > Expand Filesystem Select OK, and restart the Pi. Now ssh into the Pi again (use your new password).
sudo apt update
sudo apt dist-upgrade
You’re done!