查看网卡名称
ifconfig //查看网卡名称,如enp5s0、enp3s0等
配置固定或自动ip
sudo vi /etc/network/interfaces
interfaces文件内容如下:
- - 注释或启用auto ip 或 fixed ip下的配置
# interfaces(5) file used by ifup(8) and ifdown(8)auto loiface lo inet loopback# auto ipauto enp5s0iface enp5s0 inet dhcp# fixed ip#auto enp5s0#iface enp5s0 inet static#address 192.168.1.23#netmask 255.255.255.0
查看是否配置成功
ifconfig //查看是否配置成功ping 192.168.1.234 //查看是否联通