在 orangpi 上(ubuntu系统)配置静态IP(无线网络)
1.ssh(vscode)
【如何优雅地访问远程主机?SSH与frp内网穿透配置教程】
https://www.bilibili.com/video/BV13L411w7XU/
2.ifconfig + netplan下载
1
| sudo apt install ifconfig
|
1
| sudo apt install netplan
|
3.修改netplan配置
配置静态ip
1 2 3 4 5 6 7 8 9 10 11 12 13
| network: version: 2 wifis: wlan0: access-points: TP-LINK password: "123456" dhcp4: false optional: true addresses: [192.168.0.112/24] gateway4: 192.168.0.1 nameservers: addresses: [192.168.0.112,8.8.8.8]
|
gateway查看:
2024-06-12更新:在较为新版的ubuntu设备上,直接使用 nmcli 即可
1 2 3 4 5 6 7 8 9 10 11
| nmcli connection show
Wired Connection 1
sudo nmcli connection modify <name> ipv4.addresses 192.168.1.100/24 ipv4.gateway 192.168.1.1 ipv4.dns 8.8.8.8 ipv4.method manual
sudo systemctl restart NetworkManager
|