1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Raspberry Pi 5をヘッドレスでセットアップ

Posted at

使用ハードウェア

マイクロSDカードにRaspberry Pi OSを書き込む

SDカードの接続
  1. SDカードをPCに接続します。
Raspberry Pi Imagerのインストール
  1. Raspberry Pi ImagerのWebページからImagerをダウンロードしてインストールします。
OSイメージのSDカードへの書き込み
  1. Imagerを起動して「デバイスを選択」をクリックします。
  2. 「Raspberry Pi 5」をクリックします。
  3. 「OSを選択」をクリックして「Raspberry Pi OS(64-bit)」をクリックします。
  4. 「ストレージを選択」をクリックしてSDカードを選択します。
  5. 以下のように選択結果が表示されるので「次へ」をクリックします。
  6. カスタマイズの選択画面で「設定を編集する」をクリックします。
  7. カスタマイズ画面の「一般」タブで、チェックボックスにチェックをして、値を入力します。
  8. 「サービス」タブで、チェックボックスにチェックをしてSSHを有効化し、「保存」をクリックします。
  9. カスタマイズの選択画面で「はい」をクリックします。
  10. 「警告」画面で「はい」をクリックします。
  11. 以下のように、書き込み中画面が表示されます。
  12. 書き込みが終わると確認中画面が表示されます。
  13. 確認が完了すると正常終了画面が表示されます。
SDカードの取り外し
  1. SDカードをPCから取り外します。
Raspberry Piの起動とログイン
  1. SDカードをRaspberry Piに挿入します。
  2. 電源アダプターをRaspberry Piに接続します。
  3. 数分待ちます。(OSの初期設定も行われるため時間がかかります)
  4. PCからSSHで接続します。(ユーザー名はOSイメージ作成時のものに合わせます)
    tetsuya@vanadium:~$ ssh tetsuya@raspberrypi.local
    The authenticity of host 'raspberrypi.local (192.168.1.32)' can't be established.
    ED25519 key fingerprint is SHA256:hdGO5F5tPTMadZijcrCnYV4kn1A+aXXayDZZJjZF54I.
    This key is not known by any other names
    Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
    Warning: Permanently added 'raspberrypi.local' (ED25519) to the list of known hosts.
    tetsuya@raspberrypi.local's password:
    Linux raspberrypi 6.6.20+rpt-rpi-2712 #1 SMP PREEMPT Debian 1:6.6.20-1+rpt1 (2024-03-07) aarch64
    
    The programs included with the Debian GNU/Linux system are free software;
    the exact distribution terms for each program are described in the
    individual files in /usr/share/doc/*/copyright.
    
    Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
    permitted by applicable law.
    Last login: Sat Mar 16 00:12:26 2024
    tetsuya@raspberrypi:~ $
    
VNCのセットアップ
  1. Raspberry Piにログインした状態で以下のコマンドを実行します。  
    sudo raspi-config
    
  2. 「3 Interface Options」を選択します。
  3. 「I2 VNC」を選択します。
  4. 「Yes」を選択します。
  5. 「Ok」を選択します。
  6. PC側のターミナルで以下のコマンドを実行して「TigerVNC」のViewerをインストールします。(BookwormベースのRaspberry Pi OSは
    ディスプレイサーバがWaylandに変更になっているのでRealVNCのViewer等ではなくTigerVNCのViewerをインストールする必要があります)
    sudo apt-get -y install tigervnc-viewer
    
  7. TigerVNCのViewerを起動します。
    vncviewer
    
  8. 「VNC Server」にRaspberry Piのホスト名を入力し「Connect」をクリックします。
  9. 「Username」、「Password」を入力して「OK」をクリックします。
  10. Raspberry Piのデスクトップ画面が表示されます。
1
0
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
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?