由於/etc/network/inte***ces是唯讀檔案
可用
sudo vi /etc/network/inte***ces
或
sudo su
chmod 777 /etc/network/inte***ces
vi /etc/network/inte***ces
如果設定動態ip
# inte***ces(5) file used by ifup(8) and ifdown(8)
# include files from /etc/network/inte***ces.d:
auto eth0
iface eth0 inet dhcp
source-directory /etc/network/inte***ces.d
如果設定靜態ip
# inte***ces(5) file used by ifup(8) and ifdown(8)
# include files from /etc/network/inte***ces.d:
auto eth0
iface eth0 inet static
address 192.168.50.223
netmask 255.255.255.0
gateway 192.168.50.1
source-directory /etc/network/inte***ces.d
輸完,ctrl+c,:wq!退出
開啟/etc下的resolv.conf
vi /etc/resolv.conf
照下面**更改,114.114.114.114與114.114.115.115是國內最多用的dns伺服器,也可使用谷歌的8.8.8.8與8.8.4.4
# dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# do not edit this file by hand -- your changes will be overwritten
# 127.0.0.53 is the systemd-resolved stub resolver.
# run "systemd-resolve --status" to see details about the actual nameservers.
nameserver 127.0.0.53
nameserver 114.114.114.114
nameserver 114.114.115.115
~~
/etc/init.d/networking restart
先ping內網ip,注意我自己x是50,你們不一定是這個
再測外網61.139.2.39
PYNQ上手筆記 啟動Pynq
今天剛剛到手一塊pynq z2,確認過眼神,是我想要的板子,話不多說,開幹。pynq專案是乙個支援xilinx zynq器件的開源軟體框架,目的在於借助python降低zynq嵌入式系統開發門檻,有豐富的元件 要使用pynq,需要pynq image和zynq晶元,目前pynq專案支援三個板 參考教...
Linux上網配置
在終端輸入 ifconfig eth0 ip netmask 掩碼 回車,再輸入 route add default gw 閘道器號 例如ip號碼是192.168.11.39,閘道器號碼是192.168.11.254的朋友應輸入的是 ifconfig eth0 192.168.11.39 netma...
Centos bridge 上網配置
1 centos 修改dns 修改對應網絡卡的dns的配置檔案 vi etc resolv.conf 修改以下內容 nameserver 8.8.8.8 google網域名稱伺服器 nameserver 8.8.4.4 google網域名稱伺服器 2 centos 修改閘道器 修改對應網絡卡的閘道器...