Debian11设置静态IP

发布时间 2023-04-10 05:24:26作者: hiwjy
root@Debian:~# cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

allow-hotplug enp1s0
auto enp1s0
iface enp1s0 inet static
address 192.168.100.80
netmask 255.255.255.0
gateway 192.168.100.1
dns-nameservers 192.168.100.1