Raspberrypios Static IP

Raspberrypios で、固定IPを使用する方法

/etc/dhcpcd.conf

interface eth0
static ip_address=192.168.0.100/24
static routers=192.168.0.1
static domain_name_servers=192.168.0.1 8.8.8.8

interface wlan0
static ip_address=192.168.0.100/24
static routers=192.168.0.1
static domain_name_servers=192.168.0.1 8.8.8.8



尚、wifi接続の設定は以下の通り

/boot/wpa_supplicant.conf
(bullseyeの場合)
sudo vi /etc/wpa_supplicant/wpa_supplicant.conf


country=JP
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
  ssid="SSID名"
  psk="暗号キー"
}