ubantu配置网卡ip

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查看