一般性方法:
1 在終端輸入
sudo /etc/init.d/networking stop
2 在終端輸入
sudo gedit /etc/network/inte***ces
在檔案中新增如下內容
auto eth0
iface eth0 inet static
address 你的ip
netmask 255.255.240.0
gateway 你的閘道器
3 在終端輸入
gedit /etc/resolv.conf
在檔案中新增
nameserver 你的dns位址
4 在終端輸入
sudo /etc/init.d/networking start
一般來說你的電腦應該能上網了
附:如果你的電腦還是不能上網
那麼你可能與我一樣是dell optiplex 9020
你需要在bios設定介面將nic設定為 enable with desktop cloud
然後重啟電腦就能上網了。
ubuntu配置靜態ip
一.配置靜態ip的意義 檢視本地ip,注意配置的ip必須和本機的ip在同乙個網段,如本機是192.168.1.103,那麼ubuntu可以配置為192.168.1.104.虛擬機器選用橋接模式 配置靜態ip sudo etc network inte ces 在原檔案 auto lo iface l...
Ubuntu配置靜態IP
在ubuntu上設定ip的方法和centos上有所不同,主要有兩種 直接用命令改,暫時性方案 sudo ifconfig eth0 192.168.150.137 netmask 255.255.255.0一勞永逸的方法,就是修改 etc network inte ces 修改eth0的位址,如下 ...
ubuntu配置靜態IP位址
我本人使用的linux為深度的發行版,其核心仍然是ubuntu,並且我的使用環境是vmware中。其靜態ip配置如下 1.首先sudo vim etc network inte ces 2.然後輸入如下內容 auto lo iface lo inet loopback 前兩行是系統自帶的。auto ...