Run Script at Startup in /Etc/Init. D/

Trying to make my script run at startup by placing it in /etc/init.d/. But this doesn't helped. What else I must do?

1 Answer

It needs to be executable and installed.

Make it executable:

sudo chmod +x /etc/init.d/YOUR_SCRIPT

Install it to all runlevels:

sudo update-rc.d YOUR_SCRIPT defaults

Now restart and see your script gets run at startup.

Have Fun!

[edit]

Btw. Your script is a service now. You could always stop/start/restart it with

sudo service YOUR_SCRIPT stop/start/restart

[/edit]

2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Sophia Al-Mansoor

Sophia Al-Mansoor

Global Business & E-Commerce Reporter

Sophia analyzes international trade, startup ecosystems, retail transformation, and supply chain logistics for modern digital publications.

Share this article
Twitter Facebook Pinterest