Ubuntu的网络参数保存在文件 /etc/network/interfaces中,默认设置使用dhcp,内容如下:# The primary network interfaceauto eth0iface eth0 inet dhcp设置静态ip的方法如下:(1)编辑 /etc/network/interfaces1.1)将dhcp 一行屏蔽# The primary network interfaceauto eth0#iface eth0 inet dhcp1.2)添加和静态ip有关的参数# The primary network interfaceiface eth0 inet staticaddress 192.168.0.10netmask 255.255.255.0gateway 192.168.0.1(2)编辑 /etc/resolv.conf,设置dnsnameserver 202.96.134.133nameserver 202.106.0.20(3)执行下面两个命令,启用新设置$sudo ifdown eth0$sudo ifup eth0

应用开发2025-11-05 14:06:121297

Ubuntu的网的方的参网络参数保存在文件 /etc/network/interfaces中,亿华云默认设置使用dhcp,络参两内容如下:

# The 数保设置使用设置数Tf设primary network interface

Ubuntu的网络参数保存在文件 /etc/network/interfaces中,默认设置使用dhcp,内容如下:# The primary network interfaceauto eth0iface eth0 inet dhcp设置静态ip的方法如下:(1)编辑 /etc/network/interfaces1.1)将dhcp 一行屏蔽# The primary network interfaceauto eth0#iface eth0 inet dhcp1.2)添加和静态ip有关的参数# The primary network interfaceiface eth0 inet staticaddress 192.168.0.10netmask 255.255.255.0gateway 192.168.0.1(2)编辑 /etc/resolv.conf,设置dnsnameserver 202.96.134.133nameserver 202.106.0.20(3)执行下面两个命令,启用新设置$sudo ifdown eth0$sudo ifup eth0

auto eth0

iface eth0 inet dhcp

设置静态ip的方法如下:

(1)编辑 /etc/network/interfaces

1.1)将dhcp 一行屏蔽

# The primary network interface

auto eth0

#iface eth0 inet dhcp

1.2)添加和静态ip有关的高防服务器参数

# The primary network interface

iface eth0 inet static

address 192.168.0.10

netmask 255.255.255.0

gateway 192.168.0.1

(2)编辑 /etc/resolv.conf,设置dns

nameserver 202.96.134.133

nameserver 202.106.0.20

(3)执行下面两个命令,存文启用新设置

静态将d加和静态

$sudo ifdown eth0

静态将d加和静态

$sudo ifup eth0

静态将d加和静态

服务器托管
本文地址:http://www.bzuk.cn/html/374c299623.html
版权声明

本文仅代表作者观点,不代表本站立场。
本文系作者授权发表,未经许可,不得转载。

全站热门

联想A820t手机综合评测(一款性价比高的智能手机解析)

节仕得移动电源的性能和优势(便携充电利器,为你的设备提供稳定电源)

摩天N7手机全面评测(一款性能出众的旗舰手机,让你体验前所未有的流畅与畅快)

小米自拍杆(全新升级,更长更稳定,让你轻松拍出完美瞬间)

探究联想电脑0198错误的原因及解决方法(解读联想电脑启动出现0198错误的常见原因和有效解决方案)

联想电脑自检错误代码解析(详解联想电脑自检错误代码及解决方法)

自制电脑边框教程(简单易学的DIY教程,轻松定制你的电脑边框)

使用鸿基电脑U盘轻松装机(一步步教你完成自己的电脑组装)

友情链接

滇ICP备2023006006号-33