Ubuntu 配置网卡信息,时区

配置网卡信息

# 切换到 root
sudo su -

cd  /etc/netplan/

# 下面是例子,自己按需来改
cat 00-installer-config.yaml
# This is the network config written by 'subiquity'
network:
  ethernets:
    ens33:
      addresses:
      - 172.16.16.190/24
      nameservers:
        addresses: [114.114.114.114]
        search: []
      routes:
      - to: default
        via: 172.16.16.1
  version: 2

# 启用配置
netplan apply

# 测试
ping www.baidu.com

设置时区

# 查看时区
timedatectl

sudo timedatectl set-timezone Asia/Shanghai
posted @ 2023-04-20 15:06  klvchen  阅读(23)  评论(0编辑  收藏  举报