cd /etc/netplan
ls
ifconfig
sudo apt install net-tools
ifconfig
eno1
sudo apt install nano
sudo chmod 777 01-network-manager-all.yaml
nano 01-network-manager-all.yaml
修改配置文件
network:
version: 2
renderer: NetworkManager
ethernets:
eno1:
dhcp4: no
addresses: [192.168.8.141/24]
gateway4: 192.168.8.1
nameservers:
addresses: [192.168.8.1]
让生效
sudo netplan apply