美文网首页
ubuntu server连接有线网络

ubuntu server连接有线网络

作者: Guarder_104a | 来源:发表于2020-06-06 11:55 被阅读0次

一、查看你的无线网络名称:

ip a

二、配置netplan:

cd /etc/netplan/

# yaml文件名可能不一样,备份

sudo cp 50-cloud-init.yaml 50-cloud-init.yaml.backup

# 编辑yaml文件

sudo vim 50-cloud-init.yaml

yaml编辑如下(YourRouterID是你的路由器名(如"TP-Link-abc"), YourPassword是路由器密码(如:"123456")):

```

network:

    version: 2

    renderer: networkd

    ethernets:

        eno1:

        dhcp4: true

        optional: true

  wifis:

      wls1:

          dhcp4: true

          access-points:

              "YourRouterID":

                  password: "YourPassword"

```

保存yaml,并生效该配置

四、应用生效,如不生效需要重启:

sudo netplan apply

五、安装wpasupplicant,连接wifi;

sudo apt update

sudo apt install wpasupplicant

相关文章

网友评论

      本文标题:ubuntu server连接有线网络

      本文链接:https://www.haomeiwen.com/subject/ijfxtktx.html