root@localhost \~\]# crontab -e \[root@localhost \~\]# reboot ''' # crontab -e @reboot /path/to/my/program # @reboot 表示重启开机的时候运行一次 @reboot /test/hello.sh ''' ''' 参考: Linux crontab 命令 https://www.runoob.com/linux/linux-comm-crontab.html Run programs at startup via crontab http://www.debianhelp.co.uk/crontab.htm Linux使用crontab出现crontab: installing new crontab https://blog.csdn.net/qq_29417111/article/details/109215477 ''' ''' 其他方法: 在 /etc/rc.d/rc.local 文件中添加启动命令: 可以编辑 /etc/rc.d/rc.local 文件,在文件末尾添加要启动的命令或脚本,这样这些命令或脚本会在系统启动时自动执行。 '''
相关推荐
乱蜂朝王5 分钟前
Ubuntu 20.04安装CUDA 11.8梁洪飞1 小时前
clk学习Lw老王要学习1 小时前
Windows基础篇第一章_01VMware虚拟机安装window10~光~~2 小时前
【嵌入式linux驱动——点亮led】基于鲁班猫4 rk3588syuanmenghao2 小时前
车载Linux 系统问题定位方法论与实战系列 - 车载 Linux 平台问题定位规范vQAvXEsg2 小时前
基于遗传算法的电动汽车有序充放电优化探索qq_589568103 小时前
centos6.8镜像源yum install不成功,无法通过镜像源下载的解决方式weixin_516023074 小时前
linux下fcitx5拼音的安装hunter14504 小时前
Linux 进程与计划任务楼田莉子5 小时前
Linux学习之磁盘与Ext系列文件