Go to the netplan
directory located at /etc/netplan
.
Create file named 01-network-manager-all.yaml
.
touch /etc/netplan/01-network-manager-all.yaml
network:
version: 2
renderer: NetworkManager
ethernets:
eth0:
dhcp4: no
addresses: [172.23.207.254/20]
gateway4: 192.168.1.1
nameservers:
addresses: [8.8.8.8,8.8.8.4]
Thử và áp dụng file cấu hình:
sudo netplan try
sudo netplan apply
Kiếm tra lại bằng lệnh
ip a