ubuntu設定固定IP

2021-08-31 05:52:31 字數 542 閱讀 9893

在網上查了一下,試了試,大概是這麼個步驟。

首先設定ip

sudo gedit /etc/network/inte***ce

將其內容刪除

加上一下內容

auto lo

iface lo inet loopback

auto etho

iface etho inet static

address 192.168.0.168

netmask 255.255.255.0

network 192.168.0.0

broadcast 192.168.0.255

gateway 192.168.0.1

儲存然後修改dns

sudo gedit /etc/resolv.conf

將內容修改為

nameserver 202.103.24.68

儲存重啟網路連線

sudo /etc/init.d/networking stop

sudo /etc/init.d/networking start

Ubuntu設定固定IP

為虛擬機器設定固定ip的方法 1 設定ip 閘道器 子網掩碼 vi etc network inte ces,然後新增如下內容 auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 192.168.1.161 ...

ubuntu設定固定IP

首先設定ip sudo gedit etc network inte ce 這裡除了gedit外還可以使用vim或vi 將其內容刪除 然後寫下以下內容 auto lo iface lo inet loopback auto etho iface etho inet static address 19...

Ubuntu 設定為固定ip

vmware設定為橋接模式 使用root登陸ubuntu 使用gedit開啟 etc network inte ces auto lo iface lo inet loopback auto ens33 iface ens33 inet static address 192.168.8.100net...