(1)Ubuntu Server修改IP

配置文件地址 /etc/network/interfaces

使用编辑器打开

加入以下语句:
auto eth0
iface eth0 inet static
address 192.168.1.11 #IP地址
netmask 255.255.255.0 #子网掩码
gateway 192.168.1.1 #网关

(2)Ubuntu Server修改DNS

配置文件地址 /etc/resolv.conf

使用编辑器打开

改为如下内容:
search localdomain
nameserver 202.96.128.86 希望修改成的DNS
nameserver 202.96.128.166 备用DNS

(3)Ubuntu Server最后一步,也是最重要的一步。

在rc.local里加入这个重启网络配置的命令:
sudo /etc/init.d/networking restart

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-01-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-20
猜你喜欢
  • 2022-03-09
  • 2022-01-23
  • 2021-09-08
  • 2021-12-06
  • 2022-03-03
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案