Hyper-V 和Ubuntu Server 16.04 配置静态IP
生活随笔
收集整理的這篇文章主要介紹了
Hyper-V 和Ubuntu Server 16.04 配置静态IP
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
配置Hyper-V
在網絡適配器中找到:
找到配置ip的地方:
可以看到他的網關和子網掩碼,下面就可以設置ubuntu了。
配置ubuntu
首先執行命令sudo vi /etc/network/interfaces,然后出現很多代碼如下圖:
打開interfaces,iface eth0 inet dhcp意味著自動分配IP,將dhcp改成static后,就可以修改靜態IP,掩碼,網關,DNS服務器了。
修改之后的如下所示:
# This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5).source /etc/network/interfaces.d/*# The loopback network interface auto lo iface lo inet loopback# The primary network interface auto eth0 # iface eth0 inet dhcp iface eth0 inet staticaddress 172.25.48.100 netmask 255.255.240.0 gateway 172.25.48.1 ONBOOT yes dns-nameservers 8.8.8.8這樣就可以通過ssh連接了
總結
以上是生活随笔為你收集整理的Hyper-V 和Ubuntu Server 16.04 配置静态IP的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 小米电视有几个尺寸通常是多少
- 下一篇: 云茯苓的功效与作用