【发布时间】:2014-09-02 12:35:15
【问题描述】:
我想我可能在谷歌上搜索这些东西是错误的,但是我想知道我是否可以让我的树莓派在通过 SSH 连接到它后执行命令。
工作流程: 1)通过终端SSH进入Pi 2)登录后,树莓派执行命令显示当前温度(我已经知道这个命令)
pi 已经输出了
Linux raspberrypi 3.10.25+ #622 PREEMPT Fri Jan 3 18:41:00 GMT 2014 armv6l
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Fri Jul 11 15:11:35 2014
我可能完全误解了这一切,甚至可能在上面的对话框中执行并显示了命令。
【问题讨论】:
-
这取决于外壳的类型,但您可以向用户添加命令 .bashrc、.profile(或您的外壳使用的任何内容)。
标签: python linux ssh terminal raspberry-pi