I have lot of questions about scripts. How to configure the script that 1 It automatically turns on when the computer is turned on? 2 I was possible start and close the script with console? 3 After closing console the script still have been work?

closed as too broad by αғsнιη, Sparhawk, Jeff Schaller, Kusalananda, Jesse_b Feb 6 '18 at 12:54

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.

  • 1
    please limit your questions into single question of your specific problem, also see here to How to ask. – αғsнιη Feb 6 '18 at 11:21
  1. That's depend on what OS you are running. A program that starts when a computer is turned on is generally called a service. Traditional Unix way is to use rc script. If you used systemd, that should still be supported. See How does systemd use /etc/init.d scripts?

  2. All scripts can be started from the console by design, just use their full path or have their directory in your path and use their name. Stopping a script can be done using CtrlC if running in the foreground, or ps and kill interactively from another script, or better, pkill when available. Depending on the signal and the script, it can be terminated gracefully or not.

  3. A script launched with nohup and running in the background is unaffected when the console from where it was launched is closed.

  • You might mention in 2, that an interactive script can most often be stopped with Ctrl-C. – user unknown Feb 6 '18 at 11:41
  • @userunknown Done, Thx – jlliagre Feb 7 '18 at 0:18

Not the answer you're looking for? Browse other questions tagged or ask your own question.