ubuntu配置ip地址

2024-10-16 16:58:21

1、使用ifconfig命令查看网卡信息,网卡的名称为ens32

ubuntu配置ip地址

3、添加默认路由route add default gw 192.168.10.129,其中192.168.10.129为网关

ubuntu配置ip地址

5、增加内容添加nameserver 144.144.144.144退出并保存

ubuntu配置ip地址

7、上述步骤完成之后会在配置文件/etc/network/interfaces查看到如下内容

ubuntu配置ip地址
猜你喜欢