Debian11设置静态IP

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

 

修改DNS

nano  /etc/resolv.conf

nameserver 8.8.8.8

 

posted @ 2023-04-10 05:16  hiwjy  阅读(427)  评论(0编辑  收藏  举报