Raspberry Pi 2固定IPの設定

はてなブックマーク - Raspberry Pi 2固定IPの設定
LINEで送る
Pocket

(今回はRaspberryPi2で話を進めます。)

Raspberry Pi 2

OSはRaspbian: jessie

固定IPの設定

まず

/etc/dhcpcd.conf

を見つけて、開いてください

interface eth0
static ip_address=192.168.0.15/24
static routers=192.168.0.1
static domain_name_servers=192.168.0.1

上のように、あなたの環境に合わせて、設定してください。

ここでは「192.168.0.15/24」に設定しています。

無線LANの場合は、上記「eth0」を「wlan0」に直してください。

そうして、再起動してください。

pi@raspberrypi ~ $ sudo shutdown -r now

当たり前ですが、再起動したあと、今設定した新しい固定IPアドレスになりますので

sshやvncで接続した場合は

ipアドレスを更新して再接続する必要があります。

Raspberry Piの購入はこちら↓

Raspberry Piのインストールはこちらの記事をご参照ください。(Raspbian)

Raspberry Piインストール

Ubuntuでの固定IPアドレスの設定方法は下記を参照してください。少しやり方が違います。

Ubuntu 16.04 固定 IP

はてなブックマーク - Raspberry Pi 2固定IPの設定
LINEで送る
Pocket

Add a Comment

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close