一、IP配置

通过编辑/etc/network/interfaces文件实现IP配置。

1. DHCP

auto eth0
iface eth0 inet dhcp

2. 静态IP

auto eth0
iface eth0 inet static
        address 192.168.32.100
        netmask 255.255.255.0
        gateway 192.168.32.1

atuo eth0指定网卡,eth0为网卡名称,不同的机器可能不同,可以通过ifconfig命令查看:

ifconfig.png
具体address、netmask、gateway值根据实际情况来配置,或者咨询网络管理员。

二、 DSN配置

编辑/etc/resolv.conf文件

nameserver 114.114.114.114
nameserver 8.8.8.8
Logo

聚焦前沿AI与大模型技术探索,汇聚开发者及爱好者,共享开源项目、学习资源与行业资讯。

更多推荐