How to Install Ubuntu on raspberry pi without monitor and keyboard (headless)

Harshal kondke
2 min readFeb 6, 2021

How are we doing it?

  • We will burn ISO image on the memory card with Win32DiskImager
  • Then we will power up the pi with SD card on
  • We need to connect pi to your router via WiFi or Ethernet Cable so that we can get a local ip
  • Once we get the local ip, we will SSH into the pi from our desktop and set it up as per the requirement
  • Boom. That’s it.

Prepare SD card

  • Visit ubuntu and download the OS version as per your requirement
  • Download Win32DiskImager and install it.
  • Make Sure you have formatted the SD card in FAT32
  • Select the ISO image and SD card in win32disk imager and hit write
  • open the SD card in file explorer, and create a extension less file named as ssh in system-boot directory
  • Create another extension less file in same directory and named it as a network-config and add following lines to it
wifis:
wlan0:
dhcp4: true
optional: true
access-points:
<wifi network name>:
password: "<wifi password>"
  • Once its done, your ready to go.

Connect to pi

  • If you have Ethernet cable, connect it to your router and get pi’s local IP from routers admin webpage
  • If you don’t have a Ethernet cable then make sure you have added WiFi details so it pi can automatically get connected to your router. find the local IP from router page
  • Use following command from terminal to ssh into the pi
ssh ubuntu@<Raspberry Pi’s IP address>

You will be asked to confirm the connection:

Are you sure you want to continue connecting (yes/no/[fingerprint])?

Type “yes” to confirm.

Done.

Now setup the OS as per your use case.

--

--