因为校园网客户端的原因,需要修改电脑的MAC地址。
根据教程改了/etc/network/interfaces 中的信息:
原本是:
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
改成这样了:
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
#试过下面这三行命令
#auto enp1s0
#iface enp1s0 inet static
#hwaddress ether 30:65:EC:32:48:D3
#也试过下面这两行命令
#auto enp1s0
#iface enp1s0 inet dhcp*
#现在用的是这个
iface enp1s0 inet static
pre-up ifconfig enp1s0 hw ether 30:65:EC:32:48:D3
ifconfig -a
enp1s0 Link encap:Ethernet HWaddr 40:8d:5c:a5:5c:c2
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:889 errors:0 dropped:0 overruns:0 frame:0
TX packets:889 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:83096 (83.0 KB) TX bytes:83096 (83.0 KB)
wlx24050f8df94e Link encap:Ethernet HWaddr 24:05:0f:8d:f9:4e
inet addr:10.233.170.5 Bcast:10.233.191.255 Mask:255.255.224.0
inet6 addr: fe80::6654:7773:3b38:85bc/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4091 errors:0 dropped:0 overruns:0 frame:0
TX packets:4995 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2714584 (2.7 MB) TX bytes:839383 (839.3 KB)
ifconfig 的话 没有最上面那个
自分で質問して答えてください。
コマンドラインは使用されず、グラフィカルな操作です
右上隅のシステム設定 --> ネットワーク --> 使用しているネットワーク カード (有線) --> オプション --> イーサネット (イーサネット) --> クローンMAC アドレス: ::::(希望の MAC アドレス)-->再起動**
非常に強力な Ubuntu Q&A コミュニティ、AskUbuntu.com を見つけました。基本的に、そこで遭遇したすべての質問に対する答えを見つけることができます。残念なことに、私はそれを知るのが遅すぎました。