How to make a binary start itself after it's first run? [closed]

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















I want to automatically create some sort of "service" that does only very basic things (start a binary on system start) and it's supposed to work on most Linux distributions out there.



I want to create the service as easy as possible, ideally the binary should be able to do it itself on it's first start.










share|improve this question















closed as too broad by Rui F Ribeiro, Kusalananda, Jeff Schaller, Fabby, Thomas Mar 9 at 9:53


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.













  • 2





    If your version of Linux supports systemd, use a systemd service with Restart set to always.

    – Raman Sailopal
    Mar 8 at 13:52






  • 1





    Use systemd service unit and Read the systemd man page.

    – 炸鱼薯条德里克
    Mar 8 at 14:12






  • 1





    You could consider using the crontab. Starting a script @reboot. This could work on any Linux flavor, but auto-restarting might be tricky.

    – Michael D.
    Mar 8 at 14:16






  • 1





    There is no one mechanism that works on any Linux-based operating system. Not all Linux-based operating systems have backwards compatibility with van Smoorenburg rc. Arch Linux does not. Not all use systemd unit files. Void and Hyperbola do not. Nor, indeed, will services necessarily always run with the access rights that allow creation of service definitions.

    – JdeBP
    Mar 8 at 16:48

















1















I want to automatically create some sort of "service" that does only very basic things (start a binary on system start) and it's supposed to work on most Linux distributions out there.



I want to create the service as easy as possible, ideally the binary should be able to do it itself on it's first start.










share|improve this question















closed as too broad by Rui F Ribeiro, Kusalananda, Jeff Schaller, Fabby, Thomas Mar 9 at 9:53


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.













  • 2





    If your version of Linux supports systemd, use a systemd service with Restart set to always.

    – Raman Sailopal
    Mar 8 at 13:52






  • 1





    Use systemd service unit and Read the systemd man page.

    – 炸鱼薯条德里克
    Mar 8 at 14:12






  • 1





    You could consider using the crontab. Starting a script @reboot. This could work on any Linux flavor, but auto-restarting might be tricky.

    – Michael D.
    Mar 8 at 14:16






  • 1





    There is no one mechanism that works on any Linux-based operating system. Not all Linux-based operating systems have backwards compatibility with van Smoorenburg rc. Arch Linux does not. Not all use systemd unit files. Void and Hyperbola do not. Nor, indeed, will services necessarily always run with the access rights that allow creation of service definitions.

    – JdeBP
    Mar 8 at 16:48













1












1








1








I want to automatically create some sort of "service" that does only very basic things (start a binary on system start) and it's supposed to work on most Linux distributions out there.



I want to create the service as easy as possible, ideally the binary should be able to do it itself on it's first start.










share|improve this question
















I want to automatically create some sort of "service" that does only very basic things (start a binary on system start) and it's supposed to work on most Linux distributions out there.



I want to create the service as easy as possible, ideally the binary should be able to do it itself on it's first start.







linux services






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 11 at 10:16







Michael Niemand

















asked Mar 8 at 12:32









Michael NiemandMichael Niemand

173117




173117




closed as too broad by Rui F Ribeiro, Kusalananda, Jeff Schaller, Fabby, Thomas Mar 9 at 9:53


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.









closed as too broad by Rui F Ribeiro, Kusalananda, Jeff Schaller, Fabby, Thomas Mar 9 at 9:53


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.









  • 2





    If your version of Linux supports systemd, use a systemd service with Restart set to always.

    – Raman Sailopal
    Mar 8 at 13:52






  • 1





    Use systemd service unit and Read the systemd man page.

    – 炸鱼薯条德里克
    Mar 8 at 14:12






  • 1





    You could consider using the crontab. Starting a script @reboot. This could work on any Linux flavor, but auto-restarting might be tricky.

    – Michael D.
    Mar 8 at 14:16






  • 1





    There is no one mechanism that works on any Linux-based operating system. Not all Linux-based operating systems have backwards compatibility with van Smoorenburg rc. Arch Linux does not. Not all use systemd unit files. Void and Hyperbola do not. Nor, indeed, will services necessarily always run with the access rights that allow creation of service definitions.

    – JdeBP
    Mar 8 at 16:48












  • 2





    If your version of Linux supports systemd, use a systemd service with Restart set to always.

    – Raman Sailopal
    Mar 8 at 13:52






  • 1





    Use systemd service unit and Read the systemd man page.

    – 炸鱼薯条德里克
    Mar 8 at 14:12






  • 1





    You could consider using the crontab. Starting a script @reboot. This could work on any Linux flavor, but auto-restarting might be tricky.

    – Michael D.
    Mar 8 at 14:16






  • 1





    There is no one mechanism that works on any Linux-based operating system. Not all Linux-based operating systems have backwards compatibility with van Smoorenburg rc. Arch Linux does not. Not all use systemd unit files. Void and Hyperbola do not. Nor, indeed, will services necessarily always run with the access rights that allow creation of service definitions.

    – JdeBP
    Mar 8 at 16:48







2




2





If your version of Linux supports systemd, use a systemd service with Restart set to always.

– Raman Sailopal
Mar 8 at 13:52





If your version of Linux supports systemd, use a systemd service with Restart set to always.

– Raman Sailopal
Mar 8 at 13:52




1




1





Use systemd service unit and Read the systemd man page.

– 炸鱼薯条德里克
Mar 8 at 14:12





Use systemd service unit and Read the systemd man page.

– 炸鱼薯条德里克
Mar 8 at 14:12




1




1





You could consider using the crontab. Starting a script @reboot. This could work on any Linux flavor, but auto-restarting might be tricky.

– Michael D.
Mar 8 at 14:16





You could consider using the crontab. Starting a script @reboot. This could work on any Linux flavor, but auto-restarting might be tricky.

– Michael D.
Mar 8 at 14:16




1




1





There is no one mechanism that works on any Linux-based operating system. Not all Linux-based operating systems have backwards compatibility with van Smoorenburg rc. Arch Linux does not. Not all use systemd unit files. Void and Hyperbola do not. Nor, indeed, will services necessarily always run with the access rights that allow creation of service definitions.

– JdeBP
Mar 8 at 16:48





There is no one mechanism that works on any Linux-based operating system. Not all Linux-based operating systems have backwards compatibility with van Smoorenburg rc. Arch Linux does not. Not all use systemd unit files. Void and Hyperbola do not. Nor, indeed, will services necessarily always run with the access rights that allow creation of service definitions.

– JdeBP
Mar 8 at 16:48










0






active

oldest

votes

















0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes

Popular posts from this blog

How to check contact read email or not when send email to Individual?

Displaying single band from multi-band raster using QGIS

How many registers does an x86_64 CPU actually have?