内容简介:家裡本來是用在拿到卡後去 Raspberry Pi 的官網上下載最新版的固定 IP address 以前都是改
家裡本來是用 Raspberry Pi (第一代) 跑 SmokePing 觀察有線電視提供的網路 (看品質狀況),但前陣子 SD card 掛掉了... 只好網路上找一張新的 SD card 重新裝一套系統。
在拿到卡後去 Raspberry Pi 的官網上下載最新版的 Raspbian ,發現版本變新後,裡面有不少東西不一樣了 :o
固定 IP address 以前都是改 /etc/network/interfaces
,但裡面可以看到還蠻有趣的警告,我就是要設定 Static IP:
# Please note that this file is written to be used with dhcpcd # For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'
這邊說明了如果要設定固定 IP 的話不要改這個檔案,而是修改 /etc/dhcpcd.conf
讓 dhcpcd
處理。
打開以後依樣畫葫蘆,加了一段進去後重開機應該就可以用了:
interface eth0 static ip_address=192.168.2.1/24 static routers=192.168.2.254 static domain_name_servers=192.168.2.254
繼續處理後續的設定...
以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网
猜你喜欢:本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
Data Structures and Algorithms
Alfred V. Aho、Jeffrey D. Ullman、John E. Hopcroft / Addison Wesley / 1983-1-11 / USD 74.20
The authors' treatment of data structures in Data Structures and Algorithms is unified by an informal notion of "abstract data types," allowing readers to compare different implementations of the same......一起来看看 《Data Structures and Algorithms》 这本书的介绍吧!