Ubuntu 18.04 LTS IP 地址设置

和之前的版本不太一样, Ubuntu 18.04 的 ip地址设置是用netplan管理的

 
 
配置文件在:
/etc/netplan/50-cloud-init.yaml

 

示例文件如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
# This file is generated from information provided by
# the datasource.  Changes to it will not persist across an instance.
# To disable cloud-init's network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
    ethernets:
        ens33:
            addresses: [192.168.123.205/24]
            gateway4: 192.168.123.1
            dhcp4: no
            nameservers:
                    addresses: [223.5.5.5,223.6.6.6]
    version: 2

  

 

posted @   酱_油  阅读(624)  评论(0编辑  收藏  举报
编辑推荐:
· 一个奇形怪状的面试题:Bean中的CHM要不要加volatile?
· [.NET]调用本地 Deepseek 模型
· 一个费力不讨好的项目,让我损失了近一半的绩效!
· .NET Core 托管堆内存泄露/CPU异常的常见思路
· PostgreSQL 和 SQL Server 在统计信息维护中的关键差异
阅读排行:
· DeepSeek “源神”启动!「GitHub 热点速览」
· 我与微信审核的“相爱相杀”看个人小程序副业
· 上周热点回顾(2.17-2.23)
· 微软正式发布.NET 10 Preview 1:开启下一代开发框架新篇章
· 如何使用 Uni-app 实现视频聊天(源码,支持安卓、iOS)
点击右上角即可分享
微信分享提示