解决Ubuntu系统无法连接网络

今天在公司安装了Ubuntu系统,安装之后发现不能上网,在网上了找了好多解决方法,都没找到,主要是我对Ubuntu系统不是很熟 :@(阴暗) ,而且网上大部都是Ubuntu20以前的解决方法,20版后network配置文件变了。

  • 在Ubuntu20.04版本中使用netplan管理网络
  • 在安装好的Ubuntu20.04中没有networkingNetworkManage服务
  • netplan配置文件:/etc/netplan/*.yaml,文件名每一个都不一样
  • netplan示例文件:/usr/share/doc/netplan/example目录下,在该目录下有各种示例文件,可以提供帮助
    修改网卡配置文件
vim /etc/netplan/00-installer-config.yaml
network:
  ethernets :
    ens32 :
      addresses :
      - 192.168.0.138/24
      gateway4 : 192.168.0.1
      nameservers :
        addresses :
        - 8.8.8.8
  version : 2
netplan apply

具体可看:https://netplan.io/examples

© 版权声明
THE END
喜欢就支持一下吧
点赞13 分享
评论 共1条
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称表情代码图片

    请登录后查看评论内容