我命由我,不由天!


  • 搜索
prometheus docker golang linux kubernetes

ubuntu固定ip地址

发表于 2020-11-07 | 分类于 linux | 0 | 阅读次数 248

1.修改文件/etc/netplan/50-cloud-init.yaml 这里的yaml文件名字有可能是别的

network:
 ethernets:
     ens33:
             addresses: [172.16.20.128/24]
             dhcp4: false
             gateway4: 172.16.20.2
             nameservers:
                     addresses: [172.16.20.2]
             optional: true
 version: 2

2.重启网卡ens33为网卡名

  • ifconfig ens33 down
  • ifconfig ens33 up
  • 本文作者: Dante
  • 本文链接: https://gaodongfei.com/archives/u-b-u-n-t-u-gu-ding-i-p-de-zhi
  • 版权声明: 本博客所有文章除特别声明外,均采用CC BY-NC-SA 3.0 许可协议。转载请注明出处!
# linux
git的日常命令
apt-get的相关命令
  • 文章目录
  • 站点概览
Dante

Dante

119 日志
5 分类
5 标签
RSS
Creative Commons
0%
© 2023 Dante
由 Halo 强力驱动
|
主题 - NexT.Pisces v5.1.4
沪ICP备2020033702号