约 100 字 预计阅读 1 分钟
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
| # open target dir
cd /etc/netplan
# edit config file, you must creat if not exist
sudo vim 00-installer-config.yaml
# network device setting template
network:
ethernets:
ens33:
#dhcp4: yes
dhcp4: no
addresses:
- 192.168.130.129/24
routes:
- to: default
via: 192.168.130.2
#nameservers:
# addresses: [192.168.130.2]
version: 2
# netplan apply
sudo netplan apply
# restart
reboot
|