查看网卡
ip link show
设置wifi
# 进入文件夹查看文件
cd /etc/netplan/
# 修改文件
sudo vim xxx.yaml
# 大致如下
network:
version: 2
ethernets:
eth0:
optional: true
dhcp4: true
# add wifi setup information here ...
wifis:
wlan0:
optional: true
access-points:
;YOUR-SSID-NAME;:
password: ;YOUR-NETWORK-PASSWORD;
dhcp4: true
检查网络
# 测试网络配置
sudo netplan --debug try
# 如果异常;查看更多问题信息
sudo netplan --debug generate
# 应用配置
sudo netplan --debug apply
# 编辑文件
nano /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
# Include files from /etc/network/interfaces.d:
source /etc/network/interfaces.d/*
auto wlan0
allow-hotplug wlan0
iface wlan0 inet static
address 192.168.1.8 # IP地址
netmask 255.255.255.0 # 掩码
gateway 192.168.1.1 # 网关
随身WIFI刷真Linux(Debian)系统搭配拓展坞做超低功耗服务器