###### tags: `RaspberryPi` `wi-fi` `ssh` # Raspberry Pi ネットワーク回りの設定 # ホスト名 https://dev.classmethod.jp/hardware/raspberrypi-remote-connect/ raspberry pi は、raspberrypi.local というホスト名で、LANでアクセスできる ```bash= ping raspberrypi.local ssh pi@raspberrypi.local ``` # 無線LANの追加 eth0 = ethernet(有線LAN) wlan0 = wi-fi(無線LAN) この記事を参考に https://qiita.com/momotaro98/items/fa94c0ed6e9e727fe15e ## /etc/wpa_supplicant/wpa_supplicant.conf 無線LANの情報は、上記のパスのファイルに保存される 設定方法は、 - confファイルを直接編集する - `sudo raspi-config` > Network > wi-fi で設定する など ```bash= ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1 country=JP network={ ssid="elecom5g-~~~~" psk="パスワード" } ``` ## 固定IP設定 `/etc/dhcpcd.conf` に固定するinterface情報を書く ```bash= # 追記 interface wlan0 static ip_address=192.168.11.40/24 static routers=192.168.11.1 static domain_name_servers=192.168.11.1 ``` routers = gateway eth も wlan も 192.168.1.35 で固定してみる ```bash= interface eth0 static ip_address=192.168.1.35 #static ip6_address=fd51:42f8:caae:d92e::ff/64 static routers=192.168.1.1 static domain_name_servers=192.168.1.1 8.8.8.8 interface wlan0 static ip_address=192.168.1.35 #static ip6_address=fd51:42f8:caae:d92e::ff/64 static routers=192.168.1.1 static domain_name_servers=192.168.1.1 8.8.8.8 ``` タブを入れるとわかりやすい
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up