ネットワークデバイス名を変更しましたが、再起動後に保存されませんでした。 wlan0インターフェイスも無効にしましたが、再起動後もまだ開いています。 Ubuntuを使用してください。
ここ/etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d
# The loopback network interface
auto lo
iface lo inet loopback
# The wan0 network interface
auto wan0
iface wan0 inet dhcp
# The eth0 network interface
auto eth0
iface eth0 inet dhcp
ベストアンサー1
ここにいる他の誰かが最新バージョンのUbuntuサーバー(17.x)のヘルプを探している場合に備えて。network
(/etc/network/interfaces
)からnetplan
()に変わりました/etc/netplan/*.yml
。
これが他の人に役立つことを願って/時間を節約してください。
固定IP構成の簡単な例です。
# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
version: 2
renderer: networkd
ethernets:
eth0:
dhcp4: no
dhcp6: no
addresses: [192.168.1.100/24]
gateway4: 192.168.1.1
nameservers:
addresses: [192.168.1.1,8.8.8.8]