Get the most out of your Raspberry Pi with a command line installation

This article will guide you through the process of installing Raspberry Pi OS (previously known as Raspbian) from the command line on a Raspberry Pi 3 Model B+. We’ll show you how to download the late …


Updated October 23, 2023

Need help with your Raspberry Pi?
Contact Me!

Do you love silly Raspberry Pi Projects?
Check out my this YouTube Channel!


This article will guide you through the process of installing Raspberry Pi OS (previously known as Raspbian) from the command line on a Raspberry Pi 3 Model B+. We’ll show you how to download the latest image, write it to an SD card using the terminal and set up your Raspberry Pi without any monitor or keyboard.

Here’s how you can install Raspberry Pi OS (3.5) from the command line:

  1. Download the latest Raspberry Pi OS image To begin, download the latest version of Raspberry Pi OS Lite (which doesn’t include a graphical desktop environment) from the official website at https://www.raspberrypi.org/software/. Choose the appropriate file for your Raspberry Pi model and save it to your computer.

  2. Write the image to an SD card using the terminal Next, you need to write the downloaded image onto an SD card using the dd command in the terminal. Make sure you have the correct SD card inserted into your computer before running this step.

Open a terminal and navigate to the directory where the Raspberry Pi OS image is saved. Use the following command to write the image to the SD card:

sudo dd bs=4M if=path/to/raspberrypios.img of=/dev/sdX status=progress conv=fsync

Replace path/to/raspberrypios.img with the path to your downloaded Raspberry Pi OS image and /dev/sdX with the correct device name for your SD card (e.g. /dev/sdb). You can find this by running sudo fdisk -l.

This process may take several minutes, depending on the size of your SD card and the speed of your computer. Once it’s completed, remove the SD card from your computer and insert it into your Raspberry Pi.

  1. Boot up your Raspberry Pi without a monitor or keyboard Now you can power on your Raspberry Pi without connecting any peripherals (monitor, keyboard or mouse). The Raspberry Pi will boot up and start the installation process automatically.

  2. Connect to your Raspberry Pi via SSH To configure your Raspberry Pi, you’ll need to connect to it remotely using Secure Shell (SSH). If you haven’t done so already, enable SSH on your Raspberry Pi by creating an empty file named ssh in the boot partition of the SD card. You can do this by running:

touch /boot/ssh

Insert the SD card into your Raspberry Pi and power it on. Find the IP address of your Raspberry Pi using a tool like nmap or by checking your router’s DHCP lease table. Then, connect to your Raspberry Pi using SSH:

ssh pi@your_raspberrypi_ip_address

The default username is “pi” and the password is “raspberry”.

  1. Configure your Raspberry Pi Now you can configure your Raspberry Pi remotely using the terminal. Here are a few commands to get you started:
  • Update the system: sudo apt update && sudo apt upgrade
  • Change the default password for the “pi” user: passwd pi
  • Set up WiFi by editing /etc/wpa_supplicant/wpa_supplicant.conf: sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
  • Reboot your Raspberry Pi: sudo reboot

With your Raspberry Pi now configured, you can use it headlessly (without a monitor or keyboard) for various projects and applications.

In conclusion, installing Raspberry Pi OS from the command line is an efficient way to get your Raspberry Pi up and running without needing a monitor or keyboard. This method also allows you to automate the configuration process and set up multiple Raspberry Pis quickly and easily. By following these steps, you can unlock the full potential of your Raspberry Pi and start building awesome projects!