How to install OS in Raspberry Pi

How to Write an Image File to SD Card (for Raspberry Pi or Similar)

So you have downloaded the image files and you are ready to get your system running. Let’s go step by step.

Step 1: Download and Extract the Image

You can download image files from the provided source (or any other trusted source).

https://www.raspberrypi.com/software

After downloading, extract the zip file.
Inside it, you should find a .img file.

Step 2: Insert Your SD Card

Insert your SD card into your PC.

Now open terminal and run:

ls /dev/sd*

This will list all storage devices.
Usually your SD card will show up as something like /dev/sdb.

⚠️ Be careful here, choosing the wrong device can erase your main disk.

Step 3: Write Image to SD Card

Now run the following command:

dd if=/path-to-img-file of=/dev/sdX

Example:

dd if=archlinux-hf-2012-09-18.img of=/dev/sdb

Replace:

  • /path-to-img-file with your actual image file path
  • /dev/sdX with your SD card (like /dev/sdb)

⚠️ Note:
The contents of the SD card will be erased. Make sure you give the correct path, otherwise your system disk can be wiped.

Step 4: Wait for the Process to Complete

This process will take a few minutes.

After it finishes, you will see output like:

3862528+0 records in 
3862528+0 records out

Make sure:

  • records in = records out

That means the write was successful.

Step 5: Boot Your Device

Now remove the SD card from your PC.
Insert it into your Raspberry Pi (or similar device) and power it on.

Halla, you got ur Pi running 😀