admin 管理员组

文章数量: 887042

1. 配置 wifi

1.1. 查看系统中的网卡

ls /sys/class/net/

$ ls /sys/class/net/
enp1s0  lo  wlo1

1.2. 配置 wifi

1.2.1 一个普通的配置

 加入我们的机器可能会链接多个网络中的某一个:

网络热点1:ChinaNet-zNpQ                    password: 123456
网络热点2:Starbuck-net:                        password: 654321

network:
    version: 2
    wifis:
        wlo1:
            access-points:
                ChinaNet-zNpQ:
                    password: 123456
                Starbuck-net:
                    password: 654321
            dhcp4: true
            optional: true
1.2.2 一个需要验证的配置
  wifis:
    wlan0:
      dhcp4: true
      optional: true
      access-points:
        homewifi:
          password: "123456"
        companywifi:
          password: "123456"
        workssid:
          auth:
            key-management: eap
            method: peap
            identity: "NEWYORK\Parker"
            password: "123456"
            ca-certificate: /etc/the_ca.pem

1.3. 应用配置

sudo netplan apply

1.4. 其他配置

为了避免长时间检索系统:

A start job is running for wait for network to be Configured

做如下配置:

 将不是一直在线的网卡设为 optional,即可选,不是必须长时间等待它被配置

sudo vim /etc/netplan/00-installer-config.yaml

# This is the network config written by 'subiquity'
network:
    ethernets:
        enp1s0:
          dhcp4: true
          optional: true
    version: 2

不是tab,而是4个 white space

1.5. 应用配置

sudo netplan apply

2. apt 国内源

2.1 ubuntu 22

# aliyun
deb http://mirrors.aliyun/ubuntu/ jammy main restricted universe multiverse
deb-src http://mirrors.aliyun/ubuntu/ jammy main restricted universe multiverse
deb http://mirrors.aliyun/ubuntu/ jammy-security main restricted universe multiverse
deb-src http://mirrors.aliyun/ubuntu/ jammy-security main restricted universe multiverse
deb http://mirrors.aliyun/ubuntu/ jammy-updates main restricted universe multiverse
deb-src http://mirrors.aliyun/ubuntu/ jammy-updates main restricted universe multiverse
deb http://mirrors.aliyun/ubuntu/ jammy-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun/ubuntu/ jammy-proposed main restricted universe multiverse
deb http://mirrors.aliyun/ubuntu/ jammy-backports main restricted universe multiverse
deb-src http://mirrors.aliyun/ubuntu/ jammy-backports main restricted universe multiverse
# tsinghua
deb https://mirrors.tuna.tsinghua.edu/ubuntu/ jammy main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu/ubuntu/ jammy main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu/ubuntu/ jammy-updates main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu/ubuntu/ jammy-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu/ubuntu/ jammy-backports main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu/ubuntu/ jammy-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu/ubuntu/ jammy-security main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu/ubuntu/ jammy-security main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu/ubuntu/ jammy-proposed main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu/ubuntu/ jammy-proposed main restricted universe multiverse
# 中科大
deb https://mirrors.ustc.edu/ubuntu/ jammy main restricted universe multiverse
deb-src https://mirrors.ustc.edu/ubuntu/ jammy main restricted universe multiverse
deb https://mirrors.ustc.edu/ubuntu/ jammy-updates main restricted universe multiverse
deb-src https://mirrors.ustc.edu/ubuntu/ jammy-updates main restricted universe multiverse
deb https://mirrors.ustc.edu/ubuntu/ jammy-backports main restricted universe multiverse
deb-src https://mirrors.ustc.edu/ubuntu/ jammy-backports main restricted universe multiverse
deb https://mirrors.ustc.edu/ubuntu/ jammy-security main restricted universe multiverse
deb-src https://mirrors.ustc.edu/ubuntu/ jammy-security main restricted universe multiverse
deb https://mirrors.ustc.edu/ubuntu/ jammy-proposed main restricted universe multiverse
deb-src https://mirrors.ustc.edu/ubuntu/ jammy-proposed main restricted universe multiverse
# 163
deb http://mirrors.163/ubuntu/ jammy main restricted universe multiverse
deb http://mirrors.163/ubuntu/ jammy-security main restricted universe multiverse
deb http://mirrors.163/ubuntu/ jammy-updates main restricted universe multiverse
deb http://mirrors.163/ubuntu/ jammy-proposed main restricted universe multiverse
deb http://mirrors.163/ubuntu/ jammy-backports main restricted universe multiverse
deb-src http://mirrors.163/ubuntu/ jammy main restricted universe multiverse
deb-src http://mirrors.163/ubuntu/ jammy-security main restricted universe multiverse
deb-src http://mirrors.163/ubuntu/ jammy-updates main restricted universe multiverse
deb-src http://mirrors.163/ubuntu/ jammy-proposed main restricted universe multiverse
deb-src http://mirrors.163/ubuntu/ jammy-backports main restricted universe multiverse
   

2.2 Ubuntu 20.04

3. ubuntu 20.04(focal) 更新源

# aliyun
deb https://mirrors.aliyun/ubuntu/ focal main restricted universe multiverse
deb-src https://mirrors.aliyun/ubuntu/ focal main restricted universe multiverse
deb https://mirrors.aliyun/ubuntu/ focal-security main restricted universe multiverse
deb-src https://mirrors.aliyun/ubuntu/ focal-security main restricted universe multiverse
deb https://mirrors.aliyun/ubuntu/ focal-updates main restricted universe multiverse
deb-src https://mirrors.aliyun/ubuntu/ focal-updates main restricted universe multiverse
deb https://mirrors.aliyun/ubuntu/ focal-proposed main restricted universe multiverse
deb-src https://mirrors.aliyun/ubuntu/ focal-proposed main restricted universe multiverse
deb https://mirrors.aliyun/ubuntu/ focal-backports main restricted universe multiverse
deb-src https://mirrors.aliyun/ubuntu/ focal-backports main restricted universe multiverse
# 中科大
deb https://mirrors.ustc.edu/ubuntu/ focal main restricted universe multiverse
deb https://mirrors.ustc.edu/ubuntu/ focal-updates main restricted universe multiverse
deb https://mirrors.ustc.edu/ubuntu/ focal-backports main restricted universe multiverse
deb https://mirrors.ustc.edu/ubuntu/ focal-security main restricted universe multiverse
deb-src https://mirrors.ustc.edu/ubuntu/ focal main restricted universe multiverse
deb-src https://mirrors.ustc.edu/ubuntu/ focal-updates main restricted universe multiverse
deb-src https://mirrors.ustc.edu/ubuntu/ focal-backports main restricted universe multiverse
deb-src https://mirrors.ustc.edu/ubuntu/ focal-security main restricted universe multiverse
deb https://mirrors.ustc.edu/ubuntu/ focal-proposed main restricted universe multiverse
deb-src https://mirrors.ustc.edu/ubuntu/ focal-proposed main restricted universe multiverse

本文标签: Server Ubuntu WiFi