ubuntu server system-boot wifi配置

https://ubuntu.com/tutorials/how-to-install-ubuntu-on-your-raspberry-pi#3-wifi-or-ethernet

network-config

1
2
3
4
5
6
7
wifis:
wlan0:
dhcp4: true
optional: true
access-points:
"gbqpchot":
password: "23332333"

修改wifi设置

https://blog.csdn.net/lps11188/article/details/112058379

网线直连,网络共享,dos命令arp -a 接口192.168.137.1下的ip中找到树莓派的ip

1
cd /etc/netplan

yaml

1
2
3
4
5
6
7
8
9
10
11
12
network:
ethernets:
eth0:
dhcp4: true
optional: true
version: 2
wifis:
wlan0:
dhcp4: true
access-points:
"wifi名":
password: "wifi密码"
1
2
netplan try #或
netplan apply

花生壳内网穿透

https://service.oray.com/question/11639.html

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# 下载安装包
wget https://dl-cdn.oray.com/hsk/linux/phtunnel_5_0_rapi_aarch64.deb
# 切换管理员权限
sudo -s
# 安装
dpkg -i phtunnel_5_0_rapi_aarch64.deb
# 记录SN及密码
+--------------------------------------------------+
| Oray Phtunnel Raspberry 5.0.0 |
+--------------------------------------------------+
| SN: xxx Default password: xxx |
+--------------------------------------------------+
| Remote Management Address http://b.oray.com |
+--------------------------------------------------+
# phddns回车,可以看到扩展功能。phddns phddns(启动)| status(状态)| stop(停止)|restart(重启)| reset(重置)|enable(开机自启动)|disable(关闭开机自启动)|version(版本)

# 启动
phddns start
# 自启动
phddns enable

注意:当有线无线都连接时,断开有线需重启花生壳phddns restart(目测默认有线生效,网络切换需重启)