Ubuntu 16.04 固定 IP

はてなブックマーク - Ubuntu 16.04 固定 IP
LINEで送る
Pocket

皆さん、こんにちは、今日はUbuntu 16.04 で

固定 IPアドレスの設定方法を共有します。とても簡単です。

sudo nano /etc/network/interfaces

interfacesファイルの中で

下記のような内容で記述してください。

ここで「enp0s25」というインタフェースですが、あなたの環境に合わせて、修正してください。

auto enp0s25
iface enp0s25 inet static
address 192.168.0.16   //設定したい固定IP
netmask 255.255.255.0  //ネットマスク
gateway 192.168.0.1    //ゲートウェイ(ルーターのIPアドレス)
dns-nameservers 8.8.4.4 8.8.8.8

分からない場合は

ifconfig -a

で、調べてみてください。

設定が終わって、control+Xで「保存しますか」と聞かれて、「Y」で答えて、ファイルを保存して、再起動すれば、固定IPになるはずです!

Raspberry Piでの固定IP設定はこちらの記事を参照してください。

Raspberry Pi 2固定IPの設定

はてなブックマーク - Ubuntu 16.04 固定 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