您的位置:首页 > 运维架构 > Linux

企业环境下如何把ubuntu的dhcp改为静态IP

2019-06-03 08:47 218 查看
静态ip不能连接外网

因为老的虚拟机有ubuntu桌面 以及一些磁盘的问题, 想 迁移 自己的虚拟机,连带着把ip也迁移,(公司有些界面是 通过我的虚拟机ip访问的。)

编辑
root@ubuntu:/home/ubuntu# cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
address 168.192.10.72
netmask 255.255.255.0
gateway 168.192.0.1

然后重启即可

(adsbygoogle = window.adsbygoogle || []).push({});
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  Linux Ubuntu