ubuntu 20.02 配置静态IP地址

配置方式

# cat /etc/netplan/00-installer-config.yaml
# This is the network config written by 'subiquity'
network:
  ethernets:
    ens160:
      dhcp4: false
      addresses: [172.16.40.145/24]
      optional: true
      gateway4: 172.16.40.2
      nameservers:
              addresses: [10.10.58.2,223.6.6.6]
  version: 2

注意:/etc/netplan/ 目录下 00-installer-config.yaml 文件名可能有所不同,根据自身系统文件名进行配置;

生效

netplan apply
posted @   Star-Hitian  阅读(34)  评论(0编辑  收藏  举报
历史上的今天:
2021-09-05 python 处理中文十六进制的encode %E9%99%88%E8%80%81%E5%B8%88/%E5%9B%BE%E7%89%87
点击右上角即可分享
微信分享提示
评论
收藏
关注
推荐
深色
回顶
收起
  1. 1 海阔天空 Beyond
  2. 2 此生过半 Audio artist
  3. 3 让我欢喜让我忧 Audio artist
  4. 4 P.I.M.P. Audio artist
  5. 5 Extasy Audio artist
此生过半 - Audio artist
00:00 / 00:00
An audio error has occurred, player will skip forward in 2 seconds.

Not available