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