LoginSignup
3
1

More than 1 year has passed since last update.

Raspberry Pi 4 model Bを買ったけどディスプレイとかないのでMacだけで初期設定をする

Last updated at Posted at 2022-11-03

1. 概要

欲しかった欲しかったRaspberryPiをついに買いました!
マウスやキーボード、ディスプレイは持ち合わせていなくても、SSHを使ってMacから動かせると聞いたので買っちゃいました。
先人の方のお知恵を参考にして初期設定をやっていきます。

2. 開封の儀

IMG_6488.JPG
IMG_6491.jpeg
:heart_eyes::heart_eyes::heart_eyes::heart_eyes::heart_eyes:

ちなみにスターターキット的なやつを買いました。

3. OSをダウンロード

Raspberry Piの公式サイトから、Raspberry Pi Imagerをダウンロードします。

Raspberry Pi ImagerはRaspberry Pi OSとその他設定を、素早くかつ簡単にmicroSDカードにインストールできるソフトウェアです。

Raspberry Pi Imager is the quick and easy way to install Raspberry Pi OS and other operating systems to a microSD card, ready to use with your Raspberry Pi.
出典:https://www.raspberrypi.com/software/

Raspberry Pi ImagerをMacにインストールできたら、microSDカードをMacに差し込み、Raspberry Pi Imagerを起動します。

Raspberry Pi Imager.png

OSを選ぶからRASPBERRY PI OS (64-BIT)
ストレージを選ぶから差し込んだmicroSDカード
を選択し、右下の歯車:gear:ボタンからWi-Fi等の設定を行います。

Raspberry Pi Imager setting.png

ここまでできたら「書き込む」ボタンを押して、OSがmicroSDカードに書き込まれるのを待ちます。

4. Raspberry Piの起動

書き込みが終了したmicroSDカードをRaspberry Piに差し込んで電源を入れます。
ターミナルを開き、MacからRaspberry PiにSSHで接続します。

ssh pi@raspberrypi.local

パスワードを求められるので先ほど入力したパスワードを打ち込みます。

pi@raspberrypi.local's password:

次のように表示されれば成功です:v:

pi@raspberrypi:~ $

5. IPアドレスを固定する

ターミナルでifconfigを実行し、wlan0の項目から
inet 192.168.10.124のようなIPアドレスを確認したのち、

sudo nano /etc/dhcpcd.conf

でシステムファイルを編集します。
ファイル末尾に

interface wlan0
static ip_address=192.168.10.124
static routers=192.168.10.1
static domain_name_servers=192.168.10.1

と記入したら保存して、sudo rebootで再起動します。

6. GUI操作する設定

Raspberry Piの設定画面を開きます。

sudo raspi-config

Interfacing Options.png

Interfacing Optionsから

VNC.png

VNCを選択し、

Yes.png

Yesを選びます。

VNC ViewerのサイトからMacにVNC Viewerをダウンロードします。

VNC Viewerのアカウントを作成し、先ほどのIPアドレスを入力すると、
IP.png

home.png

Raspberry PiをGUIで使えるようになりました:raised_hands:

参考文献

3
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
1