远程控制 Raspberry Pi
bookmark_borderbookmark
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
如果您没有为设备连接显示器、键盘和鼠标,
仍然可以通过 SSH 远程控制设备。
以太网/Wi-Fi 选项
- 在无头 Raspberry Pi 上启用 SSH
(请参阅“在无头 Raspberry Pi 上启用 SSH”部分)。
- 插入以太网网线。
- 开启 Raspberry Pi 系统。
- 查找 Raspberry Pi IP
地址。
- 如果您希望使用以太网,请跳至下一部分。
- 如果您想使用 WLAN,请先通过 USB-TTL 进行连接。
然后:
USB-TTL 选项
- 通过 USB-TTL 获取控制台访问权限
数据线。
- 插入以太网网线或使用以下命令连接到 Wi-Fi 网络
行。
通过 SSH 连接到 Raspberry Pi
如需在 Raspberry Pi 上运行命令,您需要打开终端
或使用 SSH 连接。您必须使用
如果您没有连接显示器、键盘和鼠标,请使用开发机器。
Raspberry Pi
确保已启用 SSH
部署在 Raspberry Pi 上的应用
ssh pi@raspberry-pi-ip-address
password: password-for-raspberry-pi
例如:
$ ssh pi@192.168.1.101
password: raspberry
在 Raspbian 上,pi
用户的默认密码为 raspberry
。您应该
请立即更改此密码(在 Pi 上的终端中运行 passwd
)。
使用您在此步骤中设置的终端或 SSH 会话进入
命令。两者的工作目录是
/home/pi
。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-09-07。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2024-09-07。"],[[["This guide explains how to remotely control a device, specifically a Raspberry Pi, without a monitor, keyboard, or mouse using SSH."],["Two main options are provided for establishing the connection: through Ethernet/Wi-Fi, or via a USB-TTL cable."],["The Ethernet/Wi-Fi option involves enabling SSH, connecting to the network, finding the device's IP address, and then connecting via SSH."],["The USB-TTL option requires a USB-TTL cable for console access and then network configuration similar to the Ethernet/Wi-Fi method."],["Once connected via SSH, users can run commands on the Raspberry Pi remotely from their development machine."]]],[]]