步骤1:修改文件 /etc/network/interfaces
增加如下内容:
auto ens33
iface ens33 inet static
address 192.168.1.103
netmask 255.255.255.0
gateway 192.168.1.1
修改后截图如下:
Ubuntu Desktop 18.04 设置静态IP方法

步骤2:执行命令:/etc/init.d/networking restart重启网络

步骤3:编辑文件/etc/systemd/resolved.conf 修改DNS,修改后如下图:
Ubuntu Desktop 18.04 设置静态IP方法

步骤4:重启虚拟机

相关文章:

  • 2022-12-23
  • 2021-09-28
  • 2021-10-26
  • 2021-07-15
  • 2021-09-12
  • 2021-08-28
  • 2022-02-07
  • 2021-07-04
猜你喜欢
  • 2022-12-23
  • 2021-11-17
  • 2022-02-07
  • 2021-10-08
  • 2022-02-07
  • 2021-08-30
相关资源
相似解决方案