欢迎来到思维库

思维库

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 15:54:34 出处:IT科技类资讯阅读(143)

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有关的IT技术网参数

# 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加和静态

云南idc服务商

分享到:

温馨提示:以上内容和图片整理于网络,仅供参考,希望对您有帮助!如有侵权行为请联系删除!

猜你喜欢

友情链接: