Debian/Ubuntu静态IP设置

1./etc/network/interfaces

auto  enp3s0
iface enp3s0 inet static
address 192.168.1.111 
netmask 255.255.255.0
gateway  192.168.1.1

2./etc/resolv.conf

nameserver = 114.114.114.114 //DNS1
nameserver = 8.8.8.8  //DNS2

3./etc/NetworkManager/NetworkManager.conf

managed = true

4.restart network

sudo systemctl restart networking.service
sudo systemctl restart network-manager

 

你可能感兴趣的:(linux,debian,ubuntu,静态IP)