I am using Debian OS I have one executable file (a.out), Now I need to run this file after boot up Immediately.
I tried with etc/rc.local.
Any suggestion?
Thanks.
I am using Debian OS I have one executable file (a.out), Now I need to run this file after boot up Immediately.
I tried with etc/rc.local.
Any suggestion?
Thanks.
It greatly depends on your init
subsystem, which could be some sysvinit thing with runlevels, some systemd thing, or something else (e.g. runit).
You need to investigate what init
your computer (and distribution) has, and dive into the documentation of its init
program.
Recent Debian distributions are generally using systemd
. See also this.
BTW, read about crontab(5). Perhaps a @reboot
entry might be enough. You might use crontab(1) to add it.
Notice that in init
related scripts and in crontab
jobs, the PATH
is not initialized from your user's settings (but has a small system wide default). Practically speaking, better use full executable file path in such things.
a.out
(which is very likely to be some ELF executable). I strongly recommend to name it more meaningfully. – Basile Starynkevitch Jul 22 '17 at 10:02