非root用户在每条命令前加 sudo
配置静态IP地址 vi /etc/network/interfaces 内容如下: auto eth0 ##应该是启用第一块网卡的意思 ifconf eth0 inet static address 192.168.0.2 ##IP地址 netmask 255.255.255.0 ##子网掩码 gateway 192.168.0.1 ##网关
配置DNS vi /etc/resolv.conf 增加内容: nameserver 61.177.7.1
配置网关 route add default gw 192.168.0.1
重新启动网络配置 /etc/init.d/networking restart
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/100576.html原文链接:
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有