【发布时间】:2020-01-20 07:17:45
【问题描述】:
我想在 Beaglebone black 中运行一些代码,而无需在上电时执行 ssh。
我尝试在~/.bashrc 文件中放置一些命令来运行代码,但它仅在我使用ssh 登录时才有效。我已经用/etc/rc.local 文件尝试过同样的事情,但即使在 ssh 之后也没有工作。
我也在crontab -e 中尝试过@reboot my_command,但它也需要我使用 ssh 登录
有什么建议吗??
编辑:
root@beaglebone:~# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 8.6 (jessie)
Release: 8.6
Codename: jessie
root@beaglebone:~# ps aux | grep cron | grep -v grep
root 295 0.0 0.3 4428 1988 ? Ss 15:03 0:00 /usr/sbin/cron -f
crontab -e 的输出:最后几行
root@beaglebone:~# crontab -e
# For more information see the manual pages of crontab(5) and cron(8)
#
# m h dom mon dow command
#@reboot /root/wiringBone-master/library/main not working
#*/5 * * * * /root/wiringBone-master/library/main works
main是我要运行的脚本
【问题讨论】:
标签: bash ssh startup beagleboneblack