位置: 首頁 > 計算機 > 作業系統

Ubuntu Linux系統下設定Static IP的方法

2014-11-30 作業系統

Ubuntu的網路引數儲存在檔案 /etc/network/interfaces中,預設設定使用dhcp,內容如下:

# The primary network interface

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

netmask

gateway

(2)編輯 /etc/,設定dns

nameserver

nameserver

(3)執行下面兩個命令,啟用新設定

$sudo ifdown eth0

$sudo ifup eth0

標籤:ubuntu LINUX static IP 設定
2014-11-30
2016-06-03
2014-10-13
2015-02-12
2014-11-29
2017-08-20
2018-05-12
2016-12-30
2018-01-06
2015-01-10

Copyright ©2024 才華齋 All Rights Reserved.