Initial Settings For Raspberry Pi

Introduction

I made a simple note about the initial settings of the Raspberry Pi.

Environment

  • Raspberry Pi 3 B

Download OS image

Write to SD card (MacOSX / Ubuntu)

  • This time use the dd command

Mac OSx

After inserting the SD card,

diskutil list

Confirm the SD card path with. This time, /dev/disk-hogewrite an article as.
Next, unmount the SD card.

diskutil unmountDisk /dev/disk-hoge

Finally, burn to SD card using dd command

sudo dd if=raspbian.img (image file path) of=/dev/rdisk-hoge (SD card path) bs=16m (write block size)

The optimum block size depends on the environment.

Ubuntu

df -h

Check the SD card path around the command. This time, /dev/mmcblk0write an article as. Next, unmount the SD card.

umount /dev/mmcblk0

Finally, burn to SD card using dd command

sudo dd if=raspbian.img of=/dev/mmcblk0 bs=16m

You can also display the progress bar of the dd command.

Wi-Fi connection for Raspberry Pi (headless installation)

Connect to Wi-Fi from the beginning, and prepare for ssh connection and setting.

Open the SD card boot directory in terminal etc.,

touch ssh

Create and enable ssh. Next, set the Wi-Fi access point. It is OK if you write the setting in wpa_supplicant.conf under the boot directory.

network={
scan_ssid=1 # For stealth AP
ssid="ssid"
psk="encryption key"
}

Launch Raspberry Pi

Connect the edited SD card to the Raspberry Pi and start it. The initial state is

  • user name: pi
  • host name: raspberrypi
  • password: raspberry

When connecting locally,

ssh pi@raspberrypi.local

You can connect with. After that, feel free to build your own environment.

sudo raspi-config

Initial settings (change of host name and password) are possible with.

 by the author.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Maciej

Maciej

623 Followers

DevOps Consultant. I’m strongly focused on automation, security, and reliability.