本文介绍: iface ens33 inet static # 注意网卡名。address 192.168.43.10 # 配置ip地址netmask 255.255.255.0 # 掩码。gateway 192.168.43.1 # 网关auto ens33 # 网卡名。1.ifconfig查看网卡。4.ifconfig查看

1.ifconfig查看网卡

2. vi /etc/network/interfaces

auto ens33    # 网卡
iface  ens33  inet  static    # 注意网卡
address  192.168.43.10    # 配置ip地址
netmask  255.255.255.0    # 掩码
gateway  192.168.43.1    # 网关

3.重启网卡

ifconfig ens33 down
ifconfig ens33 up

4.ifconfig查看

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注