Linux笔记
[linux]Ubuntu网卡配置
285

手动配置IP
ip link set ens33 up
ip addr add 192.168.200.91/24 dev ens33
ip route add default via 192.168.200.2 dev ens33

netplan设置

1、编辑/etc/netplan/00-installer-config.yaml

This is the network config written by 'subiquity'
network:
ethernets:
ens33:
addresses: [192.168.200.92/24]
dhcp4: no
optional: true
gateway4: 192.168.200.2
nameservers:
addresses: [114.114.114.114]
version: 2

2、执行netplan命令,使配置生效 netplan apply

  • 上一篇
  • 下一篇
  • 添加评论
    评论(1)
    常瑞

    牛的!!!

    by yoniu.