操作系统版本:Linux uos 4.19.0-6-server-amd64 #1 SMP Uos 4.19.67-16fou(2020-09-07) x86_64 GNU/linux

查看网卡名称

image.png

编辑网卡配置文件

配置文件路径为:/etc/network/interfaces
image.png

添加配置内容

  1. auto ens33 #网卡名称
  2. iface ens33 inet static #
  3. address 192.168.168.22 #实际IP地址
  4. netmask 255.255.255.0 #子网掩码
  5. gateway 192.168.168.1 #网关地址

重启网卡

  1. systemctl restart networking