LoginSignup
0
0

More than 3 years have passed since last update.

Raspberry pi初期設定(自分用)

Last updated at Posted at 2020-01-01

背景と概要

通常Raspberry Pi(以下RPi) をセットアップするとき、SDカードにイメージを焼き込んだあと、HDMIディスプレイとUSBキーボードを RPi に直接接続して色々と設定します。しかしいちいちディスプレイとかキーボードに繋ぐのめちゃくちゃ面倒くさいかつ自分の覚書きのためにこの記事を書きます

環境

・Windows10
・raspberry pi 3 model B
・有線LAN

1.OSのイメージ作成

OSダウンロード
https://www.raspberrypi.org/downloads/raspbian/

SDカードフォーマット
https://www.sdcard.org/downloads/formatter/eula_windows/index.html

SDカードにOSイメージを書き込み
https://www.balena.io/etcher/

2.設定

最上位に"ssh"という名前の空フォルダを作成
(これでRPiを起動したときにsshの自動起動ができる)

RPiを有線LANに繋いで起動する

tera termから以下を打ち込んでssh接続

ホスト名 :raspberrypi.local
ユーザー名:pi
パスワード:raspberry

3.Wi-fi設定

以下のコードを打ち込んで手順に従ってSSIDとパスワードを入れつ

rasbian
$ sudo raspi-config

4.固定ipアドレス設定

$ sudo nano /etc/dhcpcd.conf

以下のコードを末尾に追記

interface wlan0
static ip_address=192.168.1.221/24
static routers=192.168.1.1
static domain_name_servers=192.168.1.1

あとはtera termでipアドレス=192.168.1.221としてsshでつなげばよろしい

参考文献

https://qiita.com/eup42/items/58bf6c336d325eba3ee2
https://qiita.com/mym/items/468d2cdb30d756b6df24
http://www.fml.org/home/fukachan/ja/linux.share.network.debian.html
https://qiita.com/yuppejp/items/413b32d14d58c10e192c
https://physical-computing-lab.net/raspberry-pi/raspberry-pi-3-%E3%81%AE%E7%84%A1%E7%B7%9Alan%E3%81%AB%E5%9B%BA%E5%AE%9Aip%E3%82%A2%E3%83%89%E3%83%AC%E3%82%B9%E3%82%92%E8%A8%AD%E5%AE%9A%E3%81%99%E3%82%8B.html

0
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
0
0